-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #599 from us3r-network/F-reconstructProfile-bufan
using route login gate at notificaiton page
- Loading branch information
Showing
3 changed files
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
import { Outlet } from 'react-router-dom'; | ||
import NotificationMenu from './NotificationMenu'; | ||
import useLogin from '@/hooks/shared/useLogin'; | ||
import NoLogin from '@/components/layout/NoLogin'; | ||
|
||
export default function NotificationLayout() { | ||
const { isLogin } = useLogin(); | ||
if (isLogin) { | ||
return ( | ||
<div className="w-full h-full flex"> | ||
<div className="w-[280px] h-full max-sm:hidden"> | ||
<NotificationMenu /> | ||
</div> | ||
<div className="flex-1 h-full overflow-auto"> | ||
<Outlet /> | ||
</div> | ||
return ( | ||
<div className="w-full h-full flex"> | ||
<div className="w-[280px] h-full max-sm:hidden"> | ||
<NotificationMenu /> | ||
</div> | ||
); | ||
} | ||
|
||
return <NoLogin />; | ||
<div className="flex-1 h-full overflow-auto"> | ||
<Outlet /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters