File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { useState } from "react";
22import Input from "../input/Input" ;
33import Image from "next/image" ;
44import axios from "axios" ;
5+ import { createDashboard } from "@/api/dashboards" ;
6+ import { TEAM_ID } from "@/constants/team" ;
57
68interface Dashboard {
79 id : number ;
@@ -39,17 +41,7 @@ export default function NewDashboard({
3941
4042 try {
4143 setLoading ( true ) ;
42- const response = await axios . post (
43- `${ process . env . NEXT_PUBLIC_BASE_URL } /${ teamId } /dashboards` ,
44- payload ,
45- {
46- headers : {
47- Authorization : `Bearer ${ token } ` ,
48- "Content-Type" : "application/json" ,
49- } ,
50- }
51- ) ;
52-
44+ const response = await createDashboard ( payload ) ;
5345 onCreate ?.( response . data ) ;
5446 onClose ?.( ) ;
5547 } catch {
You can’t perform that action at this time.
0 commit comments