Skip to content

Commit

Permalink
Remove unused ticket pages
Browse files Browse the repository at this point in the history
  • Loading branch information
emscb committed Jul 16, 2023
1 parent 4bed3a9 commit a33184c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 274 deletions.
14 changes: 6 additions & 8 deletions components/main/Teaser.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Routes } from '@/constants/routes';
import Link from 'next/link';
import React from 'react';
import { css, styled } from 'stitches.config';
import { styled } from 'stitches.config';

const TextBox = styled('div', {
fontSize: '80px',
Expand Down Expand Up @@ -71,13 +73,9 @@ const Teaser = () => {
<Date>2023.08.11-13</Date>
<Location>COEX 그랜드볼룸 & 아셈볼룸</Location>
<Block css={{ marginTop: '16px' }}>
<LinkButton
target="_blank"
href="https://event-us.kr/pyconkr/event/65861"
reversal={true}
>
티켓 구매
</LinkButton>
<Link href={Routes.TICKET.route}>
<LinkButton reversal>티켓 구매</LinkButton>
</Link>
</Block>
</TextBox>
);
Expand Down
8 changes: 2 additions & 6 deletions constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const routeKeys = [
'SPRINT_APPLY',
'LOGIN',
'TICKET',
'TICKET_DETAIL',
'MYPAGE',
'MYPAGE_REFUND',
'SESSION',
Expand Down Expand Up @@ -56,10 +55,6 @@ export const Routes: { [key in (typeof routeKeys)[number]]: RouteType } = {
title: '티켓 구매',
route: '/ticket',
},
TICKET_DETAIL: {
title: '티켓 구매',
route: '/ticket/buy',
},
MYPAGE: {
title: '마이페이지',
route: '/mypage',
Expand Down Expand Up @@ -89,7 +84,8 @@ export const NavBarMenus = [
Routes.SESSION,
Routes.TUTORIAL_LIST,
Routes.SPRINT_LIST,
].concat(isEnvProd() ? [] : [Routes.TICKET]);
Routes.TICKET,
];
export const MobileNavBarMenus = [
Routes.SESSION,
// Routes.CFP_APPLY,
Expand Down
243 changes: 0 additions & 243 deletions pages/ticket/buy/[ticketId].tsx

This file was deleted.

28 changes: 11 additions & 17 deletions pages/ticket/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useSetRecoilState } from 'recoil';
import { ticketState } from '@/stores/ticket';
import Link from 'next/link';
import { TicketAPI } from '@/api';
import { isEnvProd } from '@/utils';

const TicketPage = () => {
const router = useRouter();
Expand Down Expand Up @@ -62,15 +61,7 @@ const TicketPage = () => {
}, [router]);

useEffect(() => {
/////////////////////////////
// TODO 운영 환경에서 안 보이게
/////////////////////////////
if (isEnvProd()) {
router.replace(Routes.HOME.route);
} else {
loadTicketTypes();
}
/////////////////////////////
loadTicketTypes();
}, [loadTicketTypes, router]);
useEffect(() => {
setTicketState((prevState) => ({
Expand Down Expand Up @@ -109,14 +100,17 @@ const TicketPage = () => {
</div>
</S.TicketTypeItemFrame>
<S.TicketTypeItemButton>
<Link
href={Routes.TICKET_DETAIL.route + `/${ticketType.id}`}
passHref
>
<Button size="small" reversal>
선택하기
{ticketType.buyableUrl !== null ? (
<Link href={ticketType.buyableUrl} passHref>
<Button size="small" reversal>
구매하기
</Button>
</Link>
) : (
<Button size="small" reversal disabled>
판매 예정
</Button>
</Link>
)}
</S.TicketTypeItemButton>
</S.TicketTypeItem>
))}
Expand Down

0 comments on commit a33184c

Please sign in to comment.