-
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.
Merge branch 'dev' into feat/topic-create-page
- Loading branch information
Showing
24 changed files
with
415 additions
and
78 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 @@ | ||
import React from 'react'; | ||
|
||
import { Row } from '@components/commons/Flex/Flex'; | ||
import Text from '@components/commons/Text/Text'; | ||
import { LoginButton as Button } from '@routes/Auth/login/Login.styles'; | ||
|
||
import { colors } from '@styles/theme'; | ||
|
||
interface LoginButtonProps { | ||
onClick: () => void; | ||
backgroundColor: string; | ||
color?: string; | ||
Icon: () => React.ReactNode; | ||
buttonText: string; | ||
} | ||
|
||
const LoginButton = ({ | ||
onClick, | ||
backgroundColor, | ||
color = colors.black, | ||
Icon, | ||
buttonText, | ||
}: LoginButtonProps) => ( | ||
<Button onClick={onClick} style={{ backgroundColor }}> | ||
<Row padding={'15px 20px'} justifyContent={'space-between'}> | ||
<Icon /> | ||
<Text size={16} color={color} weight={'bold'}> | ||
{buttonText} | ||
</Text> | ||
<div style={{ width: 18, height: 18 }} /> | ||
</Row> | ||
</Button> | ||
); | ||
|
||
export default LoginButton; |
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,14 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
const IconWrapper = styled.div` | ||
display: flex; | ||
flex-shrink: 0; | ||
align-items: center; | ||
justify-content: center; | ||
width: 40px; | ||
height: 40px; | ||
background-color: #473672; | ||
border-radius: 50%; | ||
`; | ||
|
||
export { IconWrapper }; |
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,71 @@ | ||
import React from 'react'; | ||
|
||
import { Col, Row } from '@components/commons/Flex/Flex'; | ||
import Text from '@components/commons/Text/Text'; | ||
|
||
import { colors } from '@styles/theme'; | ||
|
||
import { ClockIcon, CommentIcon, HitIcon, ThumbsIcon } from '@icons/index'; | ||
|
||
import { IconWrapper } from './NotificationItem.styles'; | ||
|
||
interface NotificationItem { | ||
onClick: () => void; | ||
notification: { | ||
type: 'hit' | 'comment' | 'like' | 'close'; | ||
title: string; | ||
date: number; | ||
checked: boolean; | ||
}; | ||
} | ||
|
||
const NotificationItem = ({ onClick, notification }: NotificationItem) => { | ||
const renderIcon = () => { | ||
switch (notification.type) { | ||
case 'close': | ||
return <ClockIcon />; | ||
case 'comment': | ||
return <CommentIcon />; | ||
case 'hit': | ||
return <HitIcon />; | ||
case 'like': | ||
return ( | ||
<ThumbsIcon | ||
stroke={colors.white_40} | ||
fill={'none'} | ||
strokeWidth={2} | ||
width={32} | ||
height={33} | ||
style={{ marginLeft: 1 }} | ||
/> | ||
); | ||
} | ||
}; | ||
|
||
return ( | ||
<Row | ||
onClick={onClick} | ||
justifyContent="space-between" | ||
padding={'24px 20px'} | ||
style={{ ...(!notification.checked && { backgroundColor: '#2e234a' }) }} | ||
gap={28} | ||
> | ||
<Row gap={16}> | ||
<IconWrapper>{renderIcon()}</IconWrapper> | ||
<Col gap={8}> | ||
<Text size={15} weight={500} color={colors.white}> | ||
투표가 마감 되었어요, 지금 바로 결과를 확인해 보세요! | ||
</Text> | ||
<Text size={14} weight={400} color={colors.sub_purple2}> | ||
성수 치킨 버거의 종결지는? 성수 치킨 버거의 종결지는? | ||
</Text> | ||
</Col> | ||
</Row> | ||
<Text size={13} weight={400} color={colors.white_40} style={{ flexShrink: 0 }}> | ||
방금 | ||
</Text> | ||
</Row> | ||
); | ||
}; | ||
|
||
export default NotificationItem; |
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,44 @@ | ||
import React from 'react'; | ||
|
||
import { Row } from '@components/commons/Flex/Flex'; | ||
import Text from '@components/commons/Text/Text'; | ||
import { NOTIFICATIONS_TABS } from '@routes/Notification/Notification'; | ||
import { SelectedTabIndicator } from '@routes/Notification/Notification.styles'; | ||
|
||
import { colors } from '@styles/theme'; | ||
|
||
interface TabHeaderProps { | ||
currentTab: (typeof NOTIFICATIONS_TABS)[number]; | ||
setCurrentTab: React.Dispatch<React.SetStateAction<(typeof NOTIFICATIONS_TABS)[number]>>; | ||
} | ||
|
||
const TabHeader = ({ currentTab, setCurrentTab }: TabHeaderProps) => { | ||
const handleTabClick = (tabName: (typeof NOTIFICATIONS_TABS)[number]) => { | ||
setCurrentTab(tabName); | ||
}; | ||
return ( | ||
<Row justifyContent={'center'} gap={45} padding={'30px 0 24px 0'}> | ||
{NOTIFICATIONS_TABS.map((tabName) => { | ||
return ( | ||
<div | ||
key={tabName} | ||
style={{ position: 'relative' }} | ||
onClick={() => handleTabClick(tabName)} | ||
> | ||
{tabName === currentTab && <SelectedTabIndicator />} | ||
<Text | ||
size={18} | ||
weight={600} | ||
color={tabName === currentTab ? colors.sub_purple2 : colors.white} | ||
style={{ position: 'relative', zIndex: 1 }} | ||
> | ||
{tabName} | ||
</Text> | ||
</div> | ||
); | ||
})} | ||
</Row> | ||
); | ||
}; | ||
|
||
export default TabHeader; |
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
5 changes: 4 additions & 1 deletion
5
src/components/commons/Header/NotificationButton/NotificationButton.tsx
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
Oops, something went wrong.