Skip to content

Commit

Permalink
✏️ Fix: 마이페이지 관련 컴포넌트 내 JSDocs 정보 작성 및 오타 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Bersk3r committed May 21, 2024
1 parent 313a6e4 commit ac92565
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { RouterProvider } from 'react-router-dom';

import router from './router';

import { RouterProvider } from 'react-router-dom';
import { ToastContainer } from 'react-toastify';

import 'reset-css';
import './styles/normalize.scss';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';

ReactDOM.createRoot(document.getElementById('root')).render(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/LandingPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { motion } from 'framer-motion';
import useScrollToTop from '@/hooks/useScrollToTop';
import { useEffect } from 'react';

const LadingPage = () => {
const LandingPage = () => {
useTitle('FANDOM-K | Randing Page');
useScrollToTop();
const navigate = useNavigate();
Expand Down Expand Up @@ -116,4 +116,4 @@ const LadingPage = () => {
);
};

export default LadingPage;
export default LandingPage;
18 changes: 18 additions & 0 deletions src/pages/MyPage/components/IdolFavoriteList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ export const checkCondition = (width) => {
return count > 3 ? count : 3;
};

/**
* @param {object} idol 아이돌에 대한 정보
* @param {function} onDelete x 아이콘을 클릭했을 때 실행되는 함수
* @param {string} size 반응형에서 설정할 아이콘 크기
* @param {string} groupImage 특정 조건에서 실행할 이미지 경로
* @returns
*/

const FavoriteIdol = ({ idol, onDelete, size, groupImage }) => {
return (
<div className={style.idol_item}>
Expand All @@ -45,6 +53,16 @@ const FavoriteIdol = ({ idol, onDelete, size, groupImage }) => {
);
};

/**
* @param {function} onDelete x 아이콘을 클릭했을 때 실행되는 함수
* @param {Object[]} list 아이돌에 대한 정보
* @param {number} windowWidth 현재 윈도우의 크기
* @param {boolean} isLoading 로딩 중인지 여부
* @param {object} loadingError 발생한 에러에 대한 정보
* @param {string[]} collection 멤버가 다 모인 아이돌의 그룹 이름 리스트
* @returns
*/

const IdolFavoriteList = ({
onDelete,
list,
Expand Down
20 changes: 20 additions & 0 deletions src/pages/MyPage/components/IdolSelectList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ export const checkCondition = (width) => {
return count > 3 ? count : 3;
};

/**
* @param {object} idol 아이돌에 대한 정보
* @param {function} onClick 아이콘을 클릭했을 때 실행되는 함수
* @param {boolean} checked 아이콘 클릭 여부 판단
* @param {string} size 반응형에서 설정할 아이콘 크기
* @returns
*/

const Idol = ({ idol, onClick, checked, size }) => {
return (
<>
Expand All @@ -46,6 +54,18 @@ const Idol = ({ idol, onClick, checked, size }) => {
);
};

/**
* @param {Object[]} list 아이돌에 대한 정보가 담긴 배열
* @param {Object[]} favoriteList 선호하는 아이돌에 대한 정보가 담긴 배열
* @param {number} windowWidth 현재 윈도우의 크기
* @param {function} onClick 아이콘을 클릭했을 때 실행할 등록된 함수
* @param {boolean} isLoading 로딩 중인지 여부
* @param {object} loadingError 발생한 에러에 대한 정보
* @param {function} onSubmit 제출버튼을 클릭했을 때 실행할 등록된 함수
* @param {function} onNext 다음 데이터를 요청할 때 사용할 함수
* @returns
*/

const IdolSelectList = ({
list,
favoriteList,
Expand Down
4 changes: 4 additions & 0 deletions src/pages/MyPage/components/Nothing/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Logo from '@/assets/icons/Logo';
import style from './styles.module.scss';
/**
* @param {string} content 보여주고자 하는 내용
* @returns
*/

export const Nothing = ({ content }) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/MyPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const check_collection = (idolList) => {
return null;
};

const MyPage = ({ pageSize = ITEM_COUNTS, keyword = '' }) => {
const MyPage = () => {
useTitle('FANDOM-K | My Page');
useScrollToTop();

Expand Down Expand Up @@ -146,7 +146,7 @@ const MyPage = ({ pageSize = ITEM_COUNTS, keyword = '' }) => {
setIdolList(IdolData);
setInit(true);
} else {
getIdolList({ pageSize, keyword });
getIdolList({ pageSize: ITEM_COUNTS, keyword: '' });
}
} else {
setStorage('IdolList', JSON.stringify(idolList));
Expand Down
4 changes: 2 additions & 2 deletions src/router.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { createBrowserRouter } from 'react-router-dom';
import LadingPage from './pages/LandingPage';
import LandingPage from './pages/LandingPage';
import ListPage from './pages/ListPage';
import MyPage from './pages/MyPage';
import NotFoundPage from './pages/NotFoundPage';
Expand All @@ -19,7 +19,7 @@ const router = createBrowserRouter([
children: [
{
path: '/',
element: <LadingPage />,
element: <LandingPage />,
},
{
path: '/list',
Expand Down

0 comments on commit ac92565

Please sign in to comment.