Skip to content

Commit

Permalink
merge/#61: develop 브랜치 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
yh-project committed Aug 31, 2024
2 parents 9b559c5 + 4aa836b commit f9da406
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 68 deletions.
Binary file added ssh-web/public/assets/mascot_study.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion ssh-web/src/components/molecules/ChangeChild/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { Button } from '../../atoms/Button';
import { FaArrowAltCircleLeft, FaArrowAltCircleRight } from 'react-icons/fa';
import { api } from '../../../apis/interceptors';
import { IChild } from '../../../interfaces/userInterface';
import { getImgSrc } from '../../../utils/userUtil';

export const ChangeChild = () => {
const [childrenList, setChildrenList] = useState<IChild[]>([]);
const [selectedChild, setSelectedChild] = useState<number>(0);
const [isloading, setIsLoading] = useState<boolean>(false);
const [childImg, setChildImg] = useState<string>();

useEffect(() => {
setIsLoading(true);
Expand All @@ -17,6 +19,11 @@ export const ChangeChild = () => {
setIsLoading(false);
});
});

useEffect(() => {
setChildImg(getImgSrc(childrenList[selectedChild]?.gender, 'CHILD'));
}, []);

return (
<div className="flex flex-row relative items-center mb-2 p-2 px-4 rounded-lg space-x-3">
{selectedChild !== 0 && (
Expand All @@ -30,7 +37,7 @@ export const ChangeChild = () => {
/>
)}
<AvatarWithLabel
imageUrl="https://media1.tenor.com/m/o2nJ-w0v7lAAAAAC/teemo.gif"
imageUrl={childImg}
altText="캐릭터"
size="md"
bgColor="blue"
Expand Down
2 changes: 1 addition & 1 deletion ssh-web/src/components/organisms/QuizTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const QuizTab: React.FC<QuizTabProps> = ({
</div>
<div className="col-span-1 border-l flex justify-center items-center">
<img
src="https://media1.tenor.com/m/1fx68zKvE14AAAAC/thumbs-up-double-thumbs-up.gif"
src={`/assets/mascot_study.png`}
alt="Mascot"
className="w-24 h-24 border"
/>
Expand Down
39 changes: 0 additions & 39 deletions ssh-web/src/pages/Main.tsx

This file was deleted.

28 changes: 1 addition & 27 deletions ssh-web/src/pages/Mission/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,6 @@ export const MissionFetch: React.FC = () => {
setIsModalOpen({ isOpen: true, content: <MissionCreate /> });
};

const handleNextPage = () => {
if (activeTab === 0) {
setActivePage((prev) => prev + 1);
} else {
setCompletedPage((prev) => prev + 1);
}
};

const handlePreviousPage = () => {
if (activeTab === 0) {
setActivePage((prev) => (prev > 0 ? prev - 1 : 0));
} else {
setCompletedPage((prev) => (prev > 0 ? prev - 1 : 0));
}
};

return (
<div className={containerStyles()}>
{sizeState === EResize.D && (
Expand Down Expand Up @@ -166,19 +150,9 @@ export const MissionFetch: React.FC = () => {
)}
</div>

{/* <div className="flex flex-row gap-3">
<Button
onClick={handlePreviousPage}
disabled={activeTab === 0 ? activePage === 0 : completedPage === 0}
>
이전
</Button>
<Button onClick={handleNextPage}>다음</Button>
</div> */}

{role === 'parent' && (
<Button
classNameStyles={bigButtonStyles()}
classNameStyles={`${bigButtonStyles()} absolute bottom-8`}
onClick={onClickCreateModalOpen}
>
새 미션 등록하기
Expand Down

0 comments on commit f9da406

Please sign in to comment.