Skip to content

Commit

Permalink
Merge branch 'main' into feat/insideMyRecurit
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbeann authored Aug 26, 2024
2 parents f367bd5 + e12a6af commit 29aacd9
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 38 deletions.
21 changes: 20 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
async headers() {
return [
{
// matching all API routes
source: '/api/v1/:path*',
headers: [
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' },
{
key: 'Access-Control-Allow-Headers',
value:
'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',
},
],
},
];
},
};

export default nextConfig;
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'use client';

import { Dropdown, Icon } from '@/system/components';
import { RocketIcon } from '../components/RocketIcon';
import { Spacing } from '@/system/utils/Spacing';
import { AllRecruitList } from '@/app/(sidebar)/my-recruit/containers/AllRecruitment/AllRecruitList';
import { CardSkeleton } from '@/app/(sidebar)/my-recruit/containers/components/CardSkeleton/CardSkeleton';
import { AsyncBoundaryWithQuery } from '@/lib';
import { Dropdown } from '@/system/components';
import { Spacing } from '@/system/utils/Spacing';
import { SeasonDropdownContent } from '../components/SeasonDropdownContent';
import { useState } from 'react';
import { RocketIcon } from '../components/RocketIcon';
import { ALL_RECRUITMENT, SeasonDropdownContent } from '../components/SeasonDropdownContent';
import { ALL_RECRUITMENT } from '../components/SeasonDropdownContent';
import { CardSkeleton } from '@/app/(sidebar)/my-recruit/containers/components/CardSkeleton/CardSkeleton';

export function AllRecruitment() {
const [selectedSeason, setSelectedSeason] = useState(ALL_RECRUITMENT);
Expand Down Expand Up @@ -49,4 +50,4 @@ export function AllRecruitment() {
<Spacing size={60} />
</>
);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AsyncBoundaryWithQuery } from '@/lib';
import { Spacing } from '@/system/utils/Spacing';
import { CardSkeleton } from '../components/CardSkeleton/CardSkeleton';
import { ShoeIcon } from '../components/ShoeIcon';
import { AsyncBoundaryWithQuery } from '@/lib';
import { ProgressingRecruitList } from './ProgressingRecruitList';
import { CardSkeleton } from '../components/CardSkeleton/CardSkeleton';

export function ProgressingRecruitment() {
return (
Expand All @@ -29,4 +29,4 @@ export function ProgressingRecruitment() {
</AsyncBoundaryWithQuery>
</>
);
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { recruitStatusList } from '@/app/(sidebar)/my-recruit/constant';
import { Spacing } from '@/system/utils/Spacing';
import { Button, Dropdown, Icon } from '@/system/components';
import { Calendar } from '@/system/components/Calendar/Calendar';
import { Popover, PopoverContent, PopoverTrigger } from '@/system/components/Popover/Popover';
import { color } from '@/system/token/color';
import { Spacing } from '@/system/utils/Spacing';
import clsx from 'clsx';
import { format } from 'date-fns/format';
import { motion } from 'framer-motion';
import { Popover, PopoverContent, PopoverTrigger } from '@/system/components/Popover/Popover';
import { Calendar } from '@/system/components/Calendar/Calendar';
import { format } from 'date-fns/format';
import { useState } from 'react';
import { recruitScheduleStageList } from '../../constant';
import { recruitStatusList } from '@/app/(sidebar)/my-recruit/constant';
import { RecruitCard } from '../../type';

interface DueDateDialogProps {
title: string;
onDuedateAppend: () => void;
title?: string;
onDuedateAppend: () => void;
}

export function DueDateDialog({ title }: DueDateDialogProps) {
Expand Down
34 changes: 18 additions & 16 deletions src/app/(sidebar)/my-recruit/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
'use client';

import { InfoCard } from '@/components/InfoCard';
import { TouchButton } from '@/components/TouchButton';
import { useScroll } from '@/hooks/useScroll';
import { DndContextWithOverlay, DragEndEvent } from '@/lib/dnd-kit/dnd-kit';
import { Icon } from '@/system/components';
import { Dialog } from '@/system/components/Dialog/ShadcnDialog';
import { color } from '@/system/token/color';
import { fontSize } from '@/system/token/typography';
import { If } from '@/system/utils/If';
import { TouchButton } from '@/components/TouchButton';
import { Spacing } from '@/system/utils/Spacing';
import { cn } from '@/utils';
import { AnimatePresence, motion } from 'framer-motion';
import { useRef, useState } from 'react';
import { usePostCardToRecruit } from './api/usePostCardToRecruit';
import { usePostRecruit } from './api/usePostRecruit';
import { CardData, NewRecruitDialogContent } from './components/NewRecruitDialogContent/NewRecruitDialogContent';
import { AllRecruitment } from './containers/AllRecruitment/AllRecruitment';
import { ProgressingRecruitment } from './containers/ProgressingRecruitment/ProgressingRecruitment';
import { AllRecruitment } from './containers/AllRecruitment/AllRecruitment';
import { useRef, useState } from 'react';
import { Dialog } from '@/system/components/Dialog/ShadcnDialog';
import { NewRecruitDialogContent } from './components/NewRecruitDialogContent/NewRecruitDialogContent';
import { RightSidebar } from './containers/RightSidebar/RightSidebar';
import { DndContextWithOverlay, DragEndEvent } from '@/lib/dnd-kit/dnd-kit';
import { InfoCard } from '@/components/InfoCard';
import { AnimatePresence, motion } from 'framer-motion';
import { usePostRecruit } from './api/usePostRecruit';
import { CardData } from './components/NewRecruitDialogContent/NewRecruitDialogContent';
import { cn } from '@/utils';
import { color } from '@/system/token/color';
import { usePostCardToRecruit } from './api/usePostCardToRecruit';
import { useScroll } from '@/hooks/useScroll';
import { If } from '@/system/utils/If';
import { fontSize } from '@/system/token/typography';

const STICKY_THRESHOLD = 30;

Expand Down Expand Up @@ -65,6 +66,7 @@ export default function MyRecruit() {
className="bg-white flex items-center gap-[4px] py-[8px] px-[12px] rounded-[6px] border-neutral-5 border-[1px]"
onClick={() => setSidebarOpened(!sidebarOpened)}>
<Icon name="copy" size={16} color={sidebarOpened ? color.neutral20 : color.neutral95} />

<span
className={
'text-label1 ' + cn('font-semibold', sidebarOpened ? 'text-neutral-20' : 'text-neutral-95')
Expand Down Expand Up @@ -111,4 +113,4 @@ export default function MyRecruit() {
</Dialog>
</DndContextWithOverlay>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function Trigger({ children, className }: StrictPropsWithChildren<{ className?:
);
}


function Content({
children,
defaultOpen = false,
Expand All @@ -73,6 +74,7 @@ function Content({
{...getContentProps()}
className={cn(getContentProps().className, className)} // 기존 클래스와 새로운 클래스 병합
>

{children}
</article>
</If>
Expand Down
10 changes: 5 additions & 5 deletions src/components/InfoCard.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { useDeleteCard } from '@/app/(sidebar)/(my-info)/apis/useDeleteCard';
import { formatToYYMMDD } from '@/utils/date';
import { Icon } from '@/system/components';
import { Tag } from '@/system/components/index';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/system/components/DropdownMenu/DropdownMenu';
import { Tag } from '@/system/components/index';
import { InfoCardType, TAG_TYPE_COLOR } from '@/types/info';
import { color } from '@/system/token/color';
import { If } from '@/system/utils/If';
import { InfoCardType, TAG_TYPE_COLOR } from '@/types/info';
import { formatToYYMMDD } from '@/utils/date';
import { useDeleteCard } from '@/app/(sidebar)/(my-info)/apis/useDeleteCard';
import Link from 'next/link';
import { MouseEventHandler } from 'react';

Expand Down Expand Up @@ -74,4 +74,4 @@ export function InfoCard({ id, title, updatedDate, tagList }: InfoCardProps) {
</If>
</Link>
);
}
}
4 changes: 4 additions & 0 deletions src/container/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { cn } from '@/utils';
import { usePathname, useRouter } from 'next/navigation';
import { useState } from 'react';
import { Collapsible } from './Collapsible/Collapsible';
import { useRouter, usePathname } from 'next/navigation';
import { MY_RECRUIT_PATH, MY_INFO_PATH } from '@/route';
import { Logo } from '@/components/Logo';
import { cn } from '@/utils';

const SIDEBAR_CLASSNAME = {
expanded: 'w-[220px]',
Expand Down
1 change: 1 addition & 0 deletions src/system/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Pip } from './SVG/Pip';
import { Profile } from './SVG/Profile';
import { ProfileFill } from './SVG/ProfileFill';
import { Refresh } from './SVG/Refresh';
import { X } from './SVG/X';
import { Remove } from './SVG/Remove';
import { RightChevron } from './SVG/RightChevron';
import { Rocket } from './SVG/Rocket';
Expand Down

0 comments on commit 29aacd9

Please sign in to comment.