File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
app/components/RequireAuth Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,13 @@ import {
1212import { useSelectedThemeReset } from "@/components/atoms/selectedTheme.atom" ;
1313import { useIsLoggedIn } from "@/components/atoms/account.atom" ;
1414import { getSelectedThemeId } from "@/utils/localStorage" ;
15- import Header from "@/components/common/Header/Header" ;
16- import MainDrawer from "@/components/common/Drawer/Drawer" ;
1715
1816import Mobile from "../Mobile/Mobile" ;
1917
2018interface RequireAuthProps {
2119 children : ReactNode ;
2220}
23- function RequireAuth ( {
24- children,
25- } : RequireAuthProps ) {
21+ function RequireAuth ( { children } : RequireAuthProps ) {
2622 const [ isLoggedIn , setIsLoggedIn ] = useIsLoggedIn ( ) ;
2723 const [ currentTheme , setCurrentTheme ] = useCurrentTheme ( ) ;
2824 const resetCurrentTheme = useCurrentThemeReset ( ) ;
@@ -72,8 +68,7 @@ function RequireAuth({
7268
7369 if ( isMobile && ! allowUnauthPaths . includes ( pathname ) ) return < Mobile /> ;
7470
75- if ( ! isLoggedIn ) return < > { children } </ > ;
76- if ( isLoggedIn && ( pathname === "/" || "/admin" ) ) return < > { children } </ > ;
71+ return < > { children } </ > ;
7772}
7873
7974export default RequireAuth ;
You can’t perform that action at this time.
0 commit comments