feat(sidebar): add calls section to navigation menu
This commit introduces a new "Calls" section to the main sidebar navigation to provide users with access to call logs. - Adds a new collapsible "Calls" menu item to the sidebar configuration. - Includes sub-links for "All Calls", "Incoming", "Outgoing", and "Missed" calls. - Creates new custom icons (GlobeSearch, CallIncome, CallMade, CallMissed, CallReceived) to support the new menu items. - Updates `apexcharts` and `react-apexcharts` dependencies to newer versions.
This commit is contained in:
@@ -14,12 +14,9 @@ import React, {
|
||||
} from "react";
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
import { ILoginResponse, IUser, UserSchema } from "../lib/api/types";
|
||||
import { COOKIE_KEYS } from "../lib/shared/cookies";
|
||||
|
||||
|
||||
|
||||
interface UserContextType {
|
||||
user: IUser | null;
|
||||
accessToken: string | null;
|
||||
@@ -27,7 +24,7 @@ interface UserContextType {
|
||||
isLoading: boolean;
|
||||
setAuthState: (data: ILoginResponse) => void;
|
||||
logout: () => void;
|
||||
setUser:Dispatch<SetStateAction<IUser|null>>
|
||||
setUser: Dispatch<SetStateAction<IUser | null>>;
|
||||
}
|
||||
|
||||
const UserContext = createContext<UserContextType | undefined>(undefined);
|
||||
@@ -48,7 +45,7 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
||||
Cookies.remove(COOKIE_KEYS.access_token);
|
||||
Cookies.remove(COOKIE_KEYS.refresh_token);
|
||||
Cookies.remove(COOKIE_KEYS.user);
|
||||
router.refresh();
|
||||
window.location.href = "/auth/sign-in";
|
||||
}, [router]);
|
||||
useEffect(() => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user