Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] 행사 완료 페이지 간소화 #478

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 3 additions & 36 deletions client/src/pages/CreateEventPage/CompleteCreateEventPage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import {useLocation, useNavigate} from 'react-router-dom';
import {Button, FixedButton, Flex, Input, MainLayout, Text, Title, TopNav} from 'haengdong-design';
import {CopyToClipboard} from 'react-copy-to-clipboard';
import {css} from '@emotion/react';

import {useToast} from '@hooks/useToast/useToast';

import getEventPageUrlByEnvironment from '@utils/getEventPageUrlByEnvironment';
import {FixedButton, MainLayout, Title, TopNav} from 'haengdong-design';

import {ROUTER_URLS} from '@constants/routerUrls';

Expand All @@ -16,41 +10,14 @@ const CompleteCreateEventPage = () => {
const params = new URLSearchParams(location.search);
const eventId = params.get('eventId');

const {showToast} = useToast();

const homePageUrl = getEventPageUrlByEnvironment(eventId ?? '', 'home');

return (
<MainLayout>
<TopNav />
<Title
title="행사 개시"
description="행사가 성공적으로 개시됐어요 :) 행사 링크를 통해서 지출 내역 공유와 참여자 관리가 가능해요."
description={`행사가 성공적으로 개시됐어요 :)
관리 페이지로 이동해서 정산을 시작할 수 있어요`}
/>
<div css={css({display: 'flex', flexDirection: 'column', gap: '1rem', margin: '0 1rem'})}>
<Flex flexDirection="column">
<Text textColor="gray">링크가 없으면 페이지에 접근할 수 없어요.</Text>
<Text textColor="primary">관리를 위해서 행사 링크를 복사 후 보관해 주세요.</Text>
</Flex>
<Input value={homePageUrl} disabled />

<CopyToClipboard
text={homePageUrl}
onCopy={() =>
showToast({
showingTime: 3000,
message: '링크가 복사되었어요 :) \n링크를 절대 분실하지 마세요!',
type: 'confirm',
position: 'bottom',
bottom: '8rem',
})
}
>
<Button size="large" variants="tertiary">
행사 링크 복사하기
</Button>
</CopyToClipboard>
</div>

<FixedButton onClick={() => navigate(`${ROUTER_URLS.event}/${eventId}/admin`)}>관리 페이지로 이동</FixedButton>
</MainLayout>
Expand Down
Loading