Skip to content

Commit

Permalink
모바일 지원 로직 반영 (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
klmhyeonwoo authored Dec 2, 2024
2 parents c344d56 + cd364b1 commit 97430c1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
12 changes: 6 additions & 6 deletions public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://www.depromeet.com</loc><lastmod>2024-12-02T12:40:56.064Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/about</loc><lastmod>2024-12-02T12:40:56.065Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/apply</loc><lastmod>2024-12-02T12:40:56.065Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/blog</loc><lastmod>2024-12-02T12:40:56.065Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/project</loc><lastmod>2024-12-02T12:40:56.065Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/recruit</loc><lastmod>2024-12-02T12:40:56.065Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com</loc><lastmod>2024-12-02T13:03:08.104Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/about</loc><lastmod>2024-12-02T13:03:08.105Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/apply</loc><lastmod>2024-12-02T13:03:08.105Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/blog</loc><lastmod>2024-12-02T13:03:08.105Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/project</loc><lastmod>2024-12-02T13:03:08.105Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.depromeet.com/recruit</loc><lastmod>2024-12-02T13:03:08.105Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
7 changes: 6 additions & 1 deletion src/components/GNB/GNB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ function ApplyButton() {
const { label, action } = getPathToRecruit(router, progressState);

return (
<Button css={linkButtonCss} onClick={action} suppressHydrationWarning>
<Button
css={linkButtonCss}
onClick={action}
disabled={progressState === 'FINISH'}
suppressHydrationWarning
>
{label}
</Button>
);
Expand Down
14 changes: 8 additions & 6 deletions src/components/GNB/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ import { m } from 'framer-motion';
import { GNB_MOBILE_MENU_NAME, GNBMenu } from '~/constant/gnb';
import useIsInProgress from '~/hooks/useIsInProgress';
import { mediaQuery } from '~/styles/media';
import { getPathToRecruit } from '~/utils/utils';

interface MobileMenuProps {
onClickMenu: () => void;
}

export function MobileMenu({ onClickMenu }: MobileMenuProps) {
const { pathname, push } = useRouter();
const { isInProgress, dDay } = useIsInProgress();
const router = useRouter();
const { progressState } = useIsInProgress();
const { label, action } = getPathToRecruit(router, progressState);

const getActiveLinkcss = (menu: GNBMenu) => {
if (pathname.startsWith(menu.href)) {
if (router.pathname.startsWith(menu.href)) {
return activeLinkCss;
}
return inActiveLinkCss;
Expand All @@ -40,12 +42,12 @@ export function MobileMenu({ onClickMenu }: MobileMenuProps) {
>
{menu.type === 'button' ? (
<button
disabled={!isInProgress}
onClick={() => push(menu.href)}
disabled={progressState === 'FINISH'}
onClick={action}
css={linkCss}
suppressHydrationWarning
>
{isInProgress ? menu.name : dDay < 0 ? `D${dDay}` : '지원 마감'}
{label}
</button>
) : (
<Link
Expand Down
4 changes: 2 additions & 2 deletions src/constant/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const NOTION_RECRUIT_PATH =
'https://depromeet.notion.site/DEPROMEET-13th-f1e931cf073e43c4aeca44a4521b44be';

// NOTE: UTC 타임존에 맞추기 위해 9시간을 뺌
export const START_DATE = adjustToUTC({ dateString: '2024-12-02T21:55:00.000Z' });
export const END_DATE = adjustToUTC({ dateString: '2024-12-02T22:05:00.000Z' });
export const START_DATE = adjustToUTC({ dateString: '2024-12-02T22:10:00.000Z' });
export const END_DATE = adjustToUTC({ dateString: '2024-12-02T22:20:00.000Z' });

// export const START_DATE = '2024-04-19T06:00:00.000Z'; // test
// export const END_DATE = '2025-03-04T20:00:00.000Z'; // test
Expand Down

0 comments on commit 97430c1

Please sign in to comment.