-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e6fc6b
commit e3b0a9e
Showing
9 changed files
with
205 additions
and
52 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
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,42 @@ | ||
import React from 'react'; | ||
import S from './InvitationPage.style'; | ||
import InvitationSideBar from "./component/InvitationSideBar"; | ||
import HasHeader from "../../designsystem/component/header/hasHeader"; | ||
import {Outlet, useLocation, useNavigate} from "react-router-dom"; | ||
import {InvitationSideBarType} from "./component/InvitationSideBarType"; | ||
|
||
function getSelectedSideBarType(pathname: string): InvitationSideBarType | null { | ||
if (pathname.startsWith('/invitation/dashboard')) { | ||
return 'dashboard'; | ||
} else if (pathname.startsWith('/invitation/design')) { | ||
return 'design'; | ||
} else if (pathname.startsWith('/invitation/statistics')) { | ||
return 'statistics'; | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
function InvitationLayout() { | ||
const {pathname} = useLocation(); | ||
const navigate = useNavigate(); | ||
const sideBarType = getSelectedSideBarType(pathname); | ||
|
||
if (['/invitation', '/invitation/'].includes(pathname)) { | ||
window.location.href = '/invitation/dashboard'; | ||
return <></>; | ||
} | ||
|
||
return ( | ||
<HasHeader> | ||
<S.container> | ||
<InvitationSideBar selected={sideBarType!!} onChange={item => { | ||
navigate(item); | ||
}}/> | ||
<Outlet/> | ||
</S.container> | ||
</HasHeader> | ||
); | ||
} | ||
|
||
export default InvitationLayout; |
This file was deleted.
Oops, something went wrong.
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
13 changes: 13 additions & 0 deletions
13
src/page/invitation/statistics/detail/InvitationStatisticsDetail.style.ts
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,13 @@ | ||
import styled from "styled-components"; | ||
import colors from "../../../../designsystem/foundation/colors"; | ||
|
||
const S = { | ||
container: styled.div` | ||
display: flex; | ||
flex: 1; | ||
overflow-y: scroll; | ||
background: ${colors.white}; | ||
`, | ||
}; | ||
|
||
export default S; |
74 changes: 74 additions & 0 deletions
74
src/page/invitation/statistics/detail/InvitationStatisticsDetail.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React from 'react'; | ||
import S from './InvitationStatisticsDetail.style'; | ||
import {useNavigate, useSearchParams} from "react-router-dom"; | ||
import {Column, Row} from "../../../../designsystem/component/flexLayout"; | ||
import Icon, {IconType} from "../../../../designsystem/foundation/icon"; | ||
import colors from "../../../../designsystem/foundation/colors"; | ||
import Text from "../../../../designsystem/component/text"; | ||
import {TextType} from "../../../../designsystem/foundation/text/textType"; | ||
import HorizontalDivider from "../../../../designsystem/component/horizontalDivider"; | ||
import StatisticsValueCell from "./component/StatisticsValueCell"; | ||
|
||
function InvitationStatisticsDetail() { | ||
const navigate = useNavigate(); | ||
const [searchParams] = useSearchParams(); | ||
const url = searchParams.get('url') ?? ''; | ||
|
||
return ( | ||
<S.container> | ||
<Column gap={44} style={{width: 867, paddingTop: 64, marginLeft: 64}} $alignItems={'stretch'}> | ||
<Icon | ||
type={IconType.NormalArrow} | ||
tint={colors.g400} | ||
size={24} | ||
style={{cursor: 'pointer'}} | ||
onClick={() => { | ||
navigate('/invitation/statistics') | ||
}} | ||
/> | ||
<Column gap={8}> | ||
<Text text={'https://linkmarry-web/sss'} type={TextType.h5}/>{/*TODO: DUMMY*/} | ||
<Text text={'2024.02.01 작성'} type={TextType.p3} color={colors.g500}/>{/*TODO: DUMMY*/} | ||
</Column> | ||
<Column gap={60} $alignItems={'stretch'}> | ||
<Column gap={32} $alignItems={'stretch'}> | ||
<Column gap={8} $alignItems={'stretch'}> | ||
<Row gap={12} $alignItems={'center'}> | ||
<Text text={'하객 통계'} type={TextType.p2}/> | ||
<Text text={'동행 인원을 포함한 수치입니다.'} type={TextType.btn1} color={colors.g300}/> | ||
</Row> | ||
<Row gap={12}> | ||
<StatisticsValueCell label={'총 참석 가능 인원'} value={8} filtered={false}/> | ||
<StatisticsValueCell label={'신랑측'} value={8} filtered={false}/> | ||
<StatisticsValueCell label={'신부측'} value={8} filtered={true}/> | ||
</Row> | ||
</Column> | ||
<Column gap={8} $alignItems={'stretch'}> | ||
<Row gap={12} $alignItems={'center'}> | ||
<Text text={'식사 여부'} type={TextType.p2}/> | ||
<Text text={'동행 인원을 포함한 수치입니다.'} type={TextType.btn1} color={colors.g300}/> | ||
</Row> | ||
<Row gap={12}> | ||
<StatisticsValueCell label={'식사함'} value={8} filtered={false}/> | ||
<StatisticsValueCell label={'식사안함'} value={8} filtered={false}/> | ||
</Row> | ||
</Column> | ||
<Column gap={8} $alignItems={'stretch'}> | ||
<Text text={'디바이스 접속'} type={TextType.p2}/> | ||
<Row gap={12}> | ||
<StatisticsValueCell label={'모바일 접속'} value={8} filtered={false}/> | ||
<StatisticsValueCell label={'데스크탑 접속'} value={8} filtered={false}/> | ||
</Row> | ||
</Column> | ||
</Column> | ||
<HorizontalDivider/> | ||
<Column gap={20}> | ||
|
||
</Column> | ||
</Column> | ||
</Column> | ||
</S.container> | ||
); | ||
} | ||
|
||
export default InvitationStatisticsDetail; |
40 changes: 40 additions & 0 deletions
40
src/page/invitation/statistics/detail/component/StatisticsValueCell.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import styled from "styled-components"; | ||
import Text from "../../../../../designsystem/component/text"; | ||
import {TextType} from "../../../../../designsystem/foundation/text/textType"; | ||
import colors from "../../../../../designsystem/foundation/colors"; | ||
|
||
interface StatisticsValueCell { | ||
label: string; | ||
value: number; | ||
filtered: boolean; | ||
} | ||
|
||
function StatisticsValueCell( | ||
{ | ||
label, | ||
value, | ||
filtered | ||
}: StatisticsValueCell | ||
) { | ||
return ( | ||
<S.container style={{background: filtered ? colors.g100 : colors.white}}> | ||
<Text text={label} type={TextType.p5}/> | ||
<Text text={`${value}`} type={TextType.h2}/> | ||
</S.container> | ||
); | ||
} | ||
|
||
const S = { | ||
container: styled.div` | ||
display: flex; | ||
width: 281px; | ||
flex-direction: column; | ||
padding: 24px 20px; | ||
gap: 8px; | ||
border: 1px solid ${colors.g200}; | ||
border-radius: 12px; | ||
` | ||
} | ||
|
||
export default StatisticsValueCell; |