Skip to content

Commit acf5ffc

Browse files
committed
feat: 렌더링 요소 수정
1 parent 572bc08 commit acf5ffc

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

app/components/RequireAuth/RequireAuth.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ import {
1212
import { useSelectedThemeReset } from "@/components/atoms/selectedTheme.atom";
1313
import { useIsLoggedIn } from "@/components/atoms/account.atom";
1414
import { getSelectedThemeId } from "@/utils/localStorage";
15-
import Header from "@/components/common/Header/Header";
16-
import MainDrawer from "@/components/common/Drawer/Drawer";
1715

1816
import Mobile from "../Mobile/Mobile";
1917

2018
interface 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

7974
export default RequireAuth;

0 commit comments

Comments
 (0)