Skip to content

Commit

Permalink
fix: 행사 생성 완료 페이지 변경 (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
Todari authored Aug 22, 2024
1 parent b9781cb commit 39eff11
Showing 1 changed file with 3 additions and 36 deletions.
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 backgroundColor="white">
<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

0 comments on commit 39eff11

Please sign in to comment.