This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #210 from cosmik-network/development

Development

author
Wesley Finck
committer
GitHub
date (Nov 11, 2025, 10:58 AM -0500) commit d3635d4b parent d1234b3e
+30 -1
+24
src/webapp/app/(auth)/logout/page.tsx
··· 1 + 'use client'; 2 + 3 + import { useEffect } from 'react'; 4 + import { useAuth } from '@/hooks/useAuth'; 5 + import { Stack, Loader, Text } from '@mantine/core'; 6 + 7 + export default function LogoutPage() { 8 + const { logout } = useAuth(); 9 + 10 + useEffect(() => { 11 + logout().catch((error) => { 12 + console.error('Logout error:', error); 13 + // Force redirect if logout fails 14 + window.location.href = '/'; 15 + }); 16 + }, [logout]); 17 + 18 + return ( 19 + <Stack align="center" gap="md" mt="xl"> 20 + <Loader type="dots" /> 21 + <Text>Logging you out...</Text> 22 + </Stack> 23 + ); 24 + }
+6 -1
src/webapp/hooks/useAuth.tsx
··· 45 45 }); 46 46 47 47 useEffect(() => { 48 + // If we have no user data and we're not loading, redirect from /home 49 + if (!query.data && !query.isLoading && pathname === '/home') { 50 + router.push('/explore'); 51 + } 52 + // Handle other auth errors 48 53 if (query.isError && !query.isLoading && pathname !== '/') logout(); 49 - }, [query.isError, logout]); 54 + }, [query.data, query.isError, query.isLoading, pathname, router, logout]); 50 55 51 56 const contextValue: AuthContextType = { 52 57 user: query.data ?? null,