{show ? (
@@ -106,15 +106,19 @@ const Sidebar = ({ show, onClose }: SidebarProps) => {
}}
size="md"
/>
-
}
- onClick={() => {
- navigate("/collections");
- onClose();
- }}
- size="md"
- />
+ {is_auth ? (
+
}
+ onClick={() => {
+ navigate("/collections");
+ onClose();
+ }}
+ size="md"
+ />
+ ) : (
+ <>>
+ )}
}
@@ -130,25 +134,29 @@ const Sidebar = ({ show, onClose }: SidebarProps) => {
- }
- onClick={() => {
- navigate("/login");
- onClose();
- }}
- size="md"
- />
- }
- onClick={() => {
- // Handle logout logic here
- navigate("/login");
- onClose();
- }}
- size="md"
- />
+ {is_auth ? (
+ }
+ onClick={() => {
+ // Handle logout logic here
+ signout();
+ navigate("/login");
+ onClose();
+ }}
+ size="md"
+ />
+ ) : (
+ }
+ onClick={() => {
+ navigate("/login");
+ onClose();
+ }}
+ size="md"
+ />
+ )}
diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx
index b49c06d..b3977d4 100644
--- a/frontend/src/contexts/AuthContext.tsx
+++ b/frontend/src/contexts/AuthContext.tsx
@@ -1,5 +1,5 @@
// src/context/AuthContext.tsx
-import { read_me, read_me_business } from "api/auth";
+import { read_me } from "api/auth";
import React, {
createContext,
ReactNode,
@@ -7,78 +7,48 @@ import React, {
useEffect,
useState,
} from "react";
-import { SignupResponse, SignupResponseBusiness } from "types/auth";
+import { Response } from "types/auth";
interface AuthContextType {
- auth: SignupResponse | null;
- auth_business: SignupResponseBusiness | null;
- auth_type: "user" | "business";
- setAuth: React.Dispatch