-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: merge branch 'main' into cypress-e2e/#108
- Loading branch information
Showing
71 changed files
with
1,063 additions
and
268 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Image from 'next/image'; | ||
import logo from '../../../public/assets/logo.svg'; | ||
import Responsive from '../../ui/responsive'; | ||
import SideNavigationBar from './side-navigation-bar'; | ||
import UserInfoNavigator from '@/app/ui/user/user-info-navigator/user-info-navigator'; | ||
import SignButtonGroup from '@/app/ui/user/user-info-navigator/sign-button-group'; | ||
import Link from 'next/link'; | ||
|
||
export default function NavigationBar() { | ||
return ( | ||
<div className="absolute flex justify-between items-center p-4 border-b-[1px] w-full z-2"> | ||
<Link href={'/'}> | ||
<Image className="md:h-10 h-7 w-[110px] md:w-[150px]" width={150} height={100} src={logo} alt="main-logo" /> | ||
</Link> | ||
<Responsive maxWidth={1023}> | ||
<SideNavigationBar header={<UserInfoNavigator />} content={<div>콘텐츠</div>} footer={<SignButtonGroup />} /> | ||
</Responsive> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use client'; | ||
import { HamburgerMenuIcon } from '@radix-ui/react-icons'; | ||
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetFooter } from '../../ui/view/molecule/sheet/sheet'; | ||
import { DIALOG_KEY } from '@/app/utils/key/dialog-key.util'; | ||
import useDialog from '@/app/hooks/useDialog'; | ||
|
||
interface SideNavigationBarProps { | ||
header: React.ReactNode; | ||
footer: React.ReactNode; | ||
content: React.ReactNode; | ||
} | ||
|
||
export default function SideNavigationBar({ header, content, footer }: SideNavigationBarProps) { | ||
const { isOpen, open, close } = useDialog(DIALOG_KEY.SIDE_NAVIGATION); | ||
|
||
const handleSideNavOpen = (value: boolean) => { | ||
if (value) { | ||
open(); | ||
} else { | ||
close(); | ||
} | ||
}; | ||
|
||
return ( | ||
<Sheet open={isOpen} onOpenChange={handleSideNavOpen}> | ||
<SheetTrigger className="h-6"> | ||
<HamburgerMenuIcon className="w-6 h-6 text-white" /> | ||
</SheetTrigger> | ||
<SheetContent className="z-3"> | ||
<div className="flex h-full flex-col justify-between"> | ||
<SheetHeader>{header}</SheetHeader> | ||
<div className="w-full h-1 rounded-full my-4 bg-gray-200" /> | ||
<div className="h-full">{content}</div> | ||
<SheetFooter>{footer}</SheetFooter> | ||
</div> | ||
</SheetContent> | ||
</Sheet> | ||
); | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import '@testing-library/jest-dom'; | ||
import UserInfoNavigator from '@/app/ui/user/user-info-navigator/user-info-navigator'; | ||
import { render, screen } from '@testing-library/react'; | ||
|
||
jest.mock('next/headers', () => ({ | ||
cookies: jest.fn().mockReturnValue({ | ||
get: jest.fn().mockReturnValue({ | ||
value: 'fake-access-token', | ||
}), | ||
}), | ||
})); | ||
|
||
describe('UserInfoNavigator', () => { | ||
it('UserInfoNavigator를 렌더링한다.', async () => { | ||
render(await UserInfoNavigator()); | ||
|
||
expect(await screen.findByText(/장진욱/i)).toBeInTheDocument(); | ||
expect(await screen.findByText(/디지털콘텐츠디자인학과/i)).toBeInTheDocument(); | ||
expect(await screen.findByText(/60181666/i)).toBeInTheDocument(); | ||
}); | ||
}); |
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
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.