Skip to content

Commit

Permalink
feat: 지원하기 버튼 없애기
Browse files Browse the repository at this point in the history
  • Loading branch information
byun sumi committed Feb 20, 2024
1 parent 7947448 commit caa1cbd
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 58 deletions.
2 changes: 1 addition & 1 deletion src/components/GNB/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function MobileMenu({ onClickMenu }: MobileMenuProps) {
return (
<m.article
initial={{ height: 0, opacity: 0 }}
animate={{ height: '280px', opacity: 1 }}
animate={{ height: '234px', opacity: 1 }}
exit={{ height: 0, opacity: 0 }}
css={mobileMenuCss}
>
Expand Down
101 changes: 50 additions & 51 deletions src/components/Positions/PositionsItem.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import Image from 'next/image';
import { useRouter } from 'next/router';
import { css, Theme } from '@emotion/react';

import { ArrowIcon } from '~/components/Icons';
import { POSITION_BASE } from '~/constant/image';
import useIsInProgress from '~/hooks/useIsInProgress';
import { mediaQuery } from '~/styles/media';

type Position = 'aos' | 'design' | 'ios' | 'server' | 'web';
Expand All @@ -15,28 +12,30 @@ interface PositionsItemProps {
link: string;
}

export function PositionsItem({ type, title, link }: PositionsItemProps) {
const { isInProgress } = useIsInProgress();
export function PositionsItem({
type,
title,
}: // link
PositionsItemProps) {
// const { isInProgress } = useIsInProgress();

const router = useRouter();
// const router = useRouter();

const onClick = () => {
if (isInProgress) {
router.push(link);
}
};
// const onClick = () => {
// if (isInProgress) {
// router.push(link);
// }
// };

return (
<div css={layoutCss}>
<Image width={112} height={112} src={`${POSITION_BASE}/${type}.png`} alt={title} />
<div>
<h3 css={titleCss}>{title}</h3>
<button onClick={onClick} disabled={!isInProgress} css={linkCss}>
{/* <Link href={redirectLink} target="_blank" css={linkCss}> */}
{/* <button onClick={onClick} disabled={!isInProgress} css={linkCss}>
<span>지원하기</span>
<ArrowIcon direction="right" css={theme => arrowIconCss(theme, !isInProgress)} />
{/* </Link> */}
</button>
</button> */}
</div>
</div>
);
Expand Down Expand Up @@ -88,39 +87,39 @@ const titleCss = (theme: Theme) => css`
}
`;

const linkCss = (theme: Theme) => css`
${theme.typos.pretendard.body1};
color: ${theme.colors.blue400};
display: flex;
align-items: center;
margin-top: 8px;
> svg {
margin-left: 4px;
}
&:disabled {
cursor: not-allowed;
color: ${theme.colors.gray200};
}
${mediaQuery('mobile')} {
font-size: 14px;
}
`;

const arrowIconCss = (theme: Theme, disabled: boolean) => css`
width: 24px;
height: 24px;
> path {
stroke: ${theme.colors.blue400};
stroke-width: 4;
}
${disabled &&
css`
> path {
stroke: ${theme.colors.gray200};
}
`}
`;
// const linkCss = (theme: Theme) => css`
// ${theme.typos.pretendard.body1};
// color: ${theme.colors.blue400};
// display: flex;
// align-items: center;
// margin-top: 8px;
// > svg {
// margin-left: 4px;
// }

// &:disabled {
// cursor: not-allowed;
// color: ${theme.colors.gray200};
// }

// ${mediaQuery('mobile')} {
// font-size: 14px;
// }
// `;

// const arrowIconCss = (theme: Theme, disabled: boolean) => css`
// width: 24px;
// height: 24px;

// > path {
// stroke: ${theme.colors.blue400};
// stroke-width: 4;
// }

// ${disabled &&
// css`
// > path {
// stroke: ${theme.colors.gray200};
// }
// `}
// `;
12 changes: 6 additions & 6 deletions src/constant/gnb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export type GNBMenu = {
href: '/about' | '/recruit' | '/project' | '/apply';
type: 'text' | 'button';
};
// TODO: 지원하기 url 넣기

export const GNB_MENU_NAME: GNBMenu[] = [
{
name: 'About',
Expand All @@ -20,9 +20,9 @@ export const GNB_MENU_NAME: GNBMenu[] = [
href: '/project',
type: 'text',
},
{
name: '지원하기',
href: '/apply',
type: 'button',
},
// {
// name: '지원하기',
// href: '/apply',
// type: 'button',
// },
];

0 comments on commit caa1cbd

Please sign in to comment.