feat(labels): fix broken label frontend and hook
This commit is contained in:
parent
cc129dc64e
commit
f0b88a4ca3
|
|
@ -10,10 +10,10 @@ import {
|
||||||
Scale as ScaleIcon,
|
Scale as ScaleIcon,
|
||||||
LocalHospital as MedicalIcon,
|
LocalHospital as MedicalIcon,
|
||||||
AttachMoney as DollarIcon,
|
AttachMoney as DollarIcon,
|
||||||
Briefcase as BriefcaseIcon,
|
BusinessCenter as BriefcaseIcon,
|
||||||
Description as DocumentIcon,
|
Description as DocumentIcon,
|
||||||
Label as LabelIcon,
|
Label as LabelIcon,
|
||||||
Bug as BugIcon,
|
BugReport as BugIcon,
|
||||||
Build as BuildIcon
|
Build as BuildIcon
|
||||||
} from '@mui/icons-material';
|
} from '@mui/icons-material';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import {
|
||||||
Paper,
|
Paper,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { ColorPicker } from '@mui/x-date-pickers/internals';
|
|
||||||
import {
|
import {
|
||||||
Star as StarIcon,
|
Star as StarIcon,
|
||||||
Archive as ArchiveIcon,
|
Archive as ArchiveIcon,
|
||||||
|
|
@ -23,10 +22,10 @@ import {
|
||||||
Scale as ScaleIcon,
|
Scale as ScaleIcon,
|
||||||
LocalHospital as MedicalIcon,
|
LocalHospital as MedicalIcon,
|
||||||
AttachMoney as DollarIcon,
|
AttachMoney as DollarIcon,
|
||||||
Briefcase as BriefcaseIcon,
|
BusinessCenter as BriefcaseIcon,
|
||||||
Description as DocumentIcon,
|
Description as DocumentIcon,
|
||||||
Label as LabelIcon,
|
Label as LabelIcon,
|
||||||
Bug as BugIcon,
|
BugReport as BugIcon,
|
||||||
Build as BuildIcon,
|
Build as BuildIcon,
|
||||||
Folder as FolderIcon,
|
Folder as FolderIcon,
|
||||||
Assignment as AssignmentIcon,
|
Assignment as AssignmentIcon,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
import { useContext } from 'react';
|
|
||||||
import { api } from '../services/api';
|
import { api } from '../services/api';
|
||||||
import { AuthContext } from '../contexts/AuthContext';
|
import { useAuth } from '../contexts/AuthContext';
|
||||||
|
|
||||||
export const useApi = () => {
|
export const useApi = () => {
|
||||||
const { user } = useContext(AuthContext);
|
const { user } = useAuth();
|
||||||
|
|
||||||
// Ensure the API instance has the current auth token
|
// Ensure the API instance has the current auth token
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue