Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#82 커리큘럼 편집 모달창 구현 #208

Merged
111 changes: 106 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"jotai": "^2.6.1",
"next": "14.0.4",
"react": "^18",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^18",
"react-icons": "^5.0.1",
"react-textarea-autosize": "^8.5.3",
Expand All @@ -27,6 +28,7 @@
"@swc-jotai/react-refresh": "^0.1.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-dom": "^18",
"eslint": "^8.56.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
2 changes: 1 addition & 1 deletion src/app/team/[teamId]/study/[studyId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Flex, Grid } from '@chakra-ui/react';

import CurriculumCard from '@/components/CurriculumCard';
import StudyAssetCard from '@/components/StudyAssetCard';
import Title from '@/components/Title';
import CurriculumCard from '@/containers/study/CurriculumCard';
import Feed from '@/containers/study/Feed';
import Participant from '@/containers/study/Participant';
import StudyInfoCard from '@/containers/study/StudyInfoCard';
Expand Down
48 changes: 0 additions & 48 deletions src/components/CurriculumCard/index.tsx

This file was deleted.

81 changes: 81 additions & 0 deletions src/containers/study/CurriculumCard/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
'use client';

import { Flex, Image, Card, IconButton, useDisclosure } from '@chakra-ui/react';
import { BiArrowBack } from 'react-icons/bi';

import CurriculumCardData from '@/mocks/curriculum';

import CurriculumItem from './CurriculumItem';
import ActionModal from '../../../components/Modal/ActionModal';
import CurriculumModal from '../CurriculumModal';

const CurriculumCard = () => {
const { isOpen: isActionModalOpen, onOpen: onActionModalOpen, onClose: onActionModalClose } = useDisclosure();

return (
<Flex direction="column" w="100%">
<IconButton
color="white"
bg="green_dark"
_hover={{ bg: 'green_dark' }}
aria-label=""
icon={<BiArrowBack />}
onClick={onActionModalOpen}
size="icon_sm"
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 바꾸려고 해놓으신 거겠죠..?
갑자기 초록 동그라미밖에 안보여서 당황했습니다😯

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

바꿨습니닷..!

<Flex h={{ base: '30vh', lg: '35vh', '2xl': '40vh' }}>
<Image
display={{ base: 'none', md: 'block' }}
w={{ base: '30vh', lg: '35vh', '2xl': '40vh' }}
borderTopRightRadius="0"
borderTopLeftRadius="2xl"
borderBottomLeftRadius="2xl"
borderBottomRightRadius="0"
alt="curriculum card"
src="/images/curriculumCrops/carrot_5.png"
/>
<Card
direction="row"
w="100%"
py="4"
pr="1"
borderTopRightRadius="2xl"
borderTopLeftRadius={{ base: '2xl', md: '0' }}
borderBottomLeftRadius={{ base: '2xl', md: '0' }}
borderBottomRightRadius="2xl"
>
<Flex className="scroll" direction="column" gap="3" overflowY="auto" w="100%">
{CurriculumCardData.map((data) => {
return (
<CurriculumItem
key={data.id}
id={data.id}
name={data.name}
itemOrder={data.itemOrder}
isCompleted={data.isCompleted}
/>
);
})}
</Flex>
</Card>
</Flex>
<ActionModal
isOpen={isActionModalOpen}
onClose={onActionModalClose}
title="커리큘럼"
subButtonText="이전"
onSubButtonClick={() => {
onActionModalClose();
}}
mainButtonText="다음"
onMainButtonClick={() => {
onActionModalClose();
}}
>
<CurriculumModal />
</ActionModal>
</Flex>
);
};

export default CurriculumCard;
Loading