Skip to content

Commit

Permalink
(スマホ)非ログイン状態でもメニューを表示するように (#380)
Browse files Browse the repository at this point in the history
## Issue

- Github Issue: #379 

## 変更内容
- ログイン関係なくメニューを表示するよう変更

@coderabbitai: ignore
  • Loading branch information
takecchi authored Mar 21, 2024
1 parent e2dad73 commit c9eb21b
Showing 1 changed file with 32 additions and 37 deletions.
69 changes: 32 additions & 37 deletions src/app/(menu)/_components/menu/BottomMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';

import MobileBottomMenuLinkItem from '@/app/(menu)/_components/menu/elements/MobileBottomMenuLinkItem';
import { useProfile } from '@/swr/client/account';
import {
Home,
HomeOutlined,
Expand Down Expand Up @@ -49,44 +48,40 @@ const Spacer = styled('div')`
`;

export default function BottomMenu() {
const { data: profile } = useProfile();

return (
<>
{profile && <Spacer />}
{profile && (
<Menu>
<MobileBottomMenuLinkItem
icon={<HomeOutlined />}
activeIcon={<Home />}
href={'/home'}
label={'ホーム'}
/>
<MobileBottomMenuLinkItem
icon={<SearchOutlined />}
activeIcon={<Search />}
href={'/search'}
label={'検索'}
/>
<MobileBottomMenuLinkItem
icon={<Public />}
href={'/public'}
label={'グローバル'}
/>
<MobileBottomMenuLinkItem
icon={<NotificationsOutlined />}
activeIcon={<Notifications />}
href={'/notifications'}
label={'通知'}
/>
<MobileBottomMenuLinkItem
icon={<SettingsOutlined />}
activeIcon={<Settings />}
href={'/settings'}
label={'設定'}
/>
</Menu>
)}
<Spacer />
<Menu>
<MobileBottomMenuLinkItem
icon={<HomeOutlined />}
activeIcon={<Home />}
href={'/home'}
label={'ホーム'}
/>
<MobileBottomMenuLinkItem
icon={<SearchOutlined />}
activeIcon={<Search />}
href={'/search'}
label={'検索'}
/>
<MobileBottomMenuLinkItem
icon={<Public />}
href={'/public'}
label={'グローバル'}
/>
<MobileBottomMenuLinkItem
icon={<NotificationsOutlined />}
activeIcon={<Notifications />}
href={'/notifications'}
label={'通知'}
/>
<MobileBottomMenuLinkItem
icon={<SettingsOutlined />}
activeIcon={<Settings />}
href={'/settings'}
label={'設定'}
/>
</Menu>
</>
);
}

0 comments on commit c9eb21b

Please sign in to comment.