Skip to content

Commit 9a08fdf

Browse files
Authentication and uplaoding error fix
1 parent a0ba778 commit 9a08fdf

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/app/analysis/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ function AnalysisHUDPageContent() {
848848
Settings
849849
</Link>
850850
<button
851-
onClick={() => { logout(); window.location.href = "/login"; }}
851+
onClick={async () => { await logout(); window.location.href = "/login"; }}
852852
style={{
853853
display: "flex",
854854
alignItems: "center",

src/app/context/AuthContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ interface AuthState {
8686
login: (email: string, password: string) => Promise<{ success: boolean; error?: string }>;
8787
signup: (email: string, password: string, fullName: string, role: string) => Promise<{ success: boolean; error?: string }>;
8888
loginWithGoogle: () => Promise<{ success: boolean; error?: string }>;
89-
logout: () => void;
89+
logout: () => Promise<void>;
9090
fetchWithAuth: (url: string, options?: RequestInit) => Promise<Response>;
9191
setGeminiKey: (key: string) => Promise<{ success: boolean; error?: string }>;
9292
removeGeminiKey: () => Promise<{ success: boolean; error?: string }>;

src/app/dashboard/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function DashboardShell({ children }: { children: React.ReactNode }) {
329329
Settings
330330
</Link>
331331
<button
332-
onClick={() => { logout(); router.push("/login"); }}
332+
onClick={async () => { await logout(); router.push("/login"); }}
333333
style={{
334334
display: "flex",
335335
alignItems: "center",

0 commit comments

Comments
 (0)