Skip to content

Commit

Permalink
fix: 공통된 곳에서 사용되는 문자열 변수에 저장
Browse files Browse the repository at this point in the history
  • Loading branch information
Todari committed Aug 12, 2024
1 parent aba9154 commit cab0f4e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/src/pages/CreateEventPage/CompleteCreateEventPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const CompleteCreateEventPage = () => {
const {showToast} = useToast();

const env = process.env.NODE_ENV || '';
const homeUrlByEnvironment = `https://${env.includes('development') ? 'dev.' : ''}haengdong.pro${ROUTER_URLS.event}/${url}/home`;

return (
<MainLayout>
Expand All @@ -40,13 +41,10 @@ const CompleteCreateEventPage = () => {
<Text textColor="gray">링크가 없으면 페이지에 접근할 수 없어요.</Text>
<Text textColor="primary">관리를 위해서 행사 링크를 복사 후 보관해 주세요.</Text>
</Flex>
<Input
value={`https://${env.includes('development') ? 'dev.' : ''}haengdong.pro${ROUTER_URLS.event}/${url}/home`}
disabled
/>
<Input value={homeUrlByEnvironment} disabled />

<CopyToClipboard
text={`https://${env.includes('development') ? 'dev.' : ''}haengdong.pro${ROUTER_URLS.event}/${url}/home`}
text={homeUrlByEnvironment}
onCopy={() =>
showToast({
showingTime: 3000,
Expand Down

0 comments on commit cab0f4e

Please sign in to comment.