Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
47c2d94
feat: 파일들 Boolean 처리 (#490)
JungYeonHwi Jun 17, 2024
d053a60
feat: 파일들 Boolean 타입 재정의
JungYeonHwi Jun 17, 2024
9e73f83
feat: 파일들 Boolean 처리
JungYeonHwi Jun 17, 2024
7069cbc
feat: boolean 처리 (#490)
JungYeonHwi Jun 17, 2024
fa913fc
feat: number Number 타입 재 설정 (#490)
JungYeonHwi Jun 18, 2024
0c65aab
feat: useState type 설정
JungYeonHwi Jun 18, 2024
a634ef2
feat: ootdtypests 생성 (#490)
JungYeonHwi Jun 23, 2024
e4cb14b
feat: brandtype 재설정 (#490)
JungYeonHwi Jun 26, 2024
22e4af7
feat: colorlisttype 재설정 (#490)
JungYeonHwi Jun 26, 2024
ee84816
feat: clothwheretype 설정 (#490)
JungYeonHwi Jun 26, 2024
2695569
feat: usertype (#490)
JungYeonHwi Jun 27, 2024
421bd9d
feat: userprofiletype 설정 (#490)
JungYeonHwi Jun 27, 2024
6012629
feat: type 설정
JungYeonHwi Jun 27, 2024
ac77045
feat: imagewithtag export (#450)
JungYeonHwi Jul 1, 2024
baee710
feat: type 설정 (#450)
JungYeonHwi Jul 2, 2024
3d50c71
feat: setting type (#430)
JungYeonHwi Jul 2, 2024
7733da7
feat: style type 설정 (#450)
JungYeonHwi Jul 2, 2024
a491cd6
refactor: card type 이동 (#450)
JungYeonHwi Jul 2, 2024
acabe8b
feat: query setting (#450)
JungYeonHwi Jul 2, 2024
033ce32
feat: gender type (#450)
JungYeonHwi Jul 2, 2024
f371ec4
feat: image props (#450)
JungYeonHwi Jul 2, 2024
ad2046c
feat: type interface 구분 (#450)
JungYeonHwi Jul 2, 2024
ede3e94
feat: alram type 설정 (#450)
JungYeonHwi Jul 3, 2024
deed866
feat: setting type 설정 (#450)
JungYeonHwi Jul 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apis/_api/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
NEXT_PUBLIC_KAKAO_URI,
} from '@/constants/develop.constants';
import { postRegistUserInfoPayload } from './type';
import { QueryParams } from '@/pages/sign-in/[...callback]';
import { QueryParams } from '@/utils/types/setting.types';
import axios from 'axios';

export const login = async (payload: QueryParams) => {
Expand Down
2 changes: 1 addition & 1 deletion apis/_service/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { authApi } from '@/apis/_api';
import { postRegistUserInfoPayload } from '../_api/type';
import { QueryParams } from '@/pages/sign-in/[...callback]';
import { QueryParams } from '@/utils/types/setting.types';

export const login = async (payload: QueryParams) => {
const data = await authApi.login(payload);
Expand Down
2 changes: 1 addition & 1 deletion apis/domain/SignIn/SignInApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
NEXT_PUBLIC_NAVER_URI,
} from '@/constants/develop.constants';
import { useRouter } from 'next/router';
import { QueryParams } from '@/pages/sign-in/[...callback]';
import { QueryParams } from '@/utils/types/setting.types';
import { useState } from 'react';
import { kakaoLogin } from '@/apis/_api/auth';

Expand Down
4 changes: 2 additions & 2 deletions components/AgreeBlock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { Dispatch, SetStateAction, useEffect, useState } from 'react';
interface AgreeBlockProps {
title: string;
buttonClick?: () => void;
checked: boolean;
setChecked: Dispatch<SetStateAction<boolean>>;
checked: Boolean;
setChecked: Dispatch<SetStateAction<Boolean>>;
lastItem?: Boolean;
}

Expand Down
6 changes: 0 additions & 6 deletions components/BrandList/Brand/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ interface BrandProps {
state?: Boolean;
}

export interface BrandType {
id: number;
name: string;
state?: Boolean;
}

export default function Brand({
keyword,
name,
Expand Down
3 changes: 2 additions & 1 deletion components/BrandList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Dispatch, SetStateAction, useEffect } from 'react';
import Brand, { BrandType } from './Brand';
import Brand from './Brand';
import { BrandType } from '@/utils/types/OOTD.types';
import S from './style';
import useEffectAfterMount from '@/hooks/useEffectAfterMount';

Expand Down
2 changes: 1 addition & 1 deletion components/Card/CardLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Layout, CardBody } from './style';
import { CardProps } from '../type';
import { CardProps } from '@/utils/types/card.type';
import ImageWithCaption from '@/components/UI/ImageWithCaption';

export default function Card(props: CardProps) {
Expand Down
11 changes: 1 addition & 10 deletions components/Card/MainFavoriteCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ import LikeToggle from '@/components/Toggle/LikeToggle';
import { useState } from 'react';
import Link from 'next/link';
import { OOTDApi } from '@/apis/domain/OOTD/OOTDApi';

export interface MainFavoriteCardProps {
ootdId: number;
ootdImageUrl: string;
ootdImageCount: number;
writerId: number;
writerProfileImage?: string;
writerName: string;
onClick?: () => void;
}
import { MainFavoriteCardProps } from '@/utils/types/OOTD.types';

export default function MainFavoriteCard({
ootdId,
Expand Down
2 changes: 1 addition & 1 deletion components/Card/MainTopUserCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Body4, Title2 } from '@/components/UI';
import { CardComponentProps } from '../type';
import { CardComponentProps } from '@/utils/types/card.type';
import Card from '../CardLayout';
import { Layout } from './style';

Expand Down
4 changes: 2 additions & 2 deletions components/Carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import Slider from 'react-slick';
interface CarouselProps {
children: React.ReactNode;
slidesToShow: number;
infinite: Boolean;
infinite: boolean;
ParentRef?: React.MutableRefObject<Slider | null>;
afterChange?: (currentIndex: number) => void;
beforeChange?: (currentIndex: number, nextIndex: number) => void;
swipe?: boolean;
swipe?: Boolean;
dots?: boolean;
initialSlide?: number;
}
Expand Down
2 changes: 1 addition & 1 deletion components/ClothCategory/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import S from './style';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import { Body3 } from '@/components/UI';
import { CategoryListType } from '../Domain/AddCloth/ClothCategoryModal';
import { CategoryListType } from '@/utils/types/OOTD.types';
import ClothApi from '@/apis/domain/Cloth/ClothApi';

interface ClothCategoryModalProps {
Expand Down
2 changes: 1 addition & 1 deletion components/ClothInformation/TagInformation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Body4, Title2 } from '@/components/UI';
import S from './style';
import Image from 'next/image';
import { ClothInformationProps } from '../type';
import { ClothInformationProps } from '@/utils/types/cloth.types';
import { AiFillCloseCircle } from 'react-icons/ai';

export default function TagInformation({
Expand Down
2 changes: 1 addition & 1 deletion components/ClothInformation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClothInformationProps } from './type';
import { ClothInformationProps } from '@/utils/types/cloth.types';
import S from './style';
import { Body4, Title2 } from '../UI';
import ImageWithCaption from '../UI/ImageWithCaption';
Expand Down
16 changes: 0 additions & 16 deletions components/ClothInformation/type.ts

This file was deleted.

8 changes: 1 addition & 7 deletions components/ColorList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ import { Dispatch, SetStateAction, useEffect, useLayoutEffect } from 'react';
import S from './style';
import ColorSpan from './ColorSpan';
import ClothApi from '@/apis/domain/Cloth/ClothApi';

export type ColorListType = {
id: number;
name: string;
colorCode: string;
state: Boolean;
}[];
import { ColorListType } from '@/utils/types/OOTD.types';

interface ColorListProps {
colorList: ColorListType;
Expand Down
23 changes: 1 addition & 22 deletions components/Comment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,7 @@ import S from './style';
import Avatar from '@/public/images/Avatar.svg';
import { OOTDApi } from '@/apis/domain/OOTD/OOTDApi';
import NextImage from '../NextImage';

export interface CommentProps {
id: number;
userId: number;
userImage: string;
userName: string;
content: string;
timeStamp: string;
type?: 'child';
view?: 'preview';
onClickReplyButton?: () => void;
taggedUserName?: string;
myComment?: Boolean;
parentId?: number;
reRender: number;
depth?: number;
setReRender: Dispatch<SetStateAction<number>>;
setDeclaration: Dispatch<SetStateAction<Boolean>>;
setReportUserName: Dispatch<SetStateAction<string>>;
setReportID: Dispatch<SetStateAction<number>>;
setBlockID: Dispatch<SetStateAction<number>>;
}
import { CommentProps } from '@/utils/types/OOTD.types';

function Comment({
id,
Expand Down
8 changes: 4 additions & 4 deletions components/DeclarationModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button3, Caption1, Title1 } from '../UI';
import WithdrawBlock from '../Setting/WithdrawBlock';
import ReportApi from '@/apis/domain/Report/ReportApi';

export type withdrawBlockType = {
type withdrawBlockType = {
id: number;
message: string;
}[];
Expand All @@ -30,7 +30,7 @@ export default function DeclarationModal({
setReceivedDeclaration,
setReportStatus,
}: DeclarationModalProps) {
const [checks, setChecks] = useState<Array<boolean>>([
const [checks, setChecks] = useState<Array<Boolean>>([
false,
false,
false,
Expand All @@ -40,7 +40,7 @@ export default function DeclarationModal({
false,
false,
]);
const [possible, setPossible] = useState<boolean>(false);
const [possible, setPossible] = useState<Boolean>(false);

useEffect(() => {
setPossible(checks.some((check) => check));
Expand All @@ -63,7 +63,7 @@ export default function DeclarationModal({

const onClickDeclarationButton = async () => {
const trueIndices: number[] = checks.reduce(
(acc: number[], currentValue: boolean, currentIndex: number) => {
(acc: number[], currentValue: Boolean, currentIndex: number) => {
if (currentValue === true) {
acc.push(currentIndex);
}
Expand Down
2 changes: 1 addition & 1 deletion components/Domain/AddCloth/BrandModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import S from './style';
import { Body4, Button3, Title1 } from '@/components/UI';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import BrandList from '@/components/BrandList';
import { BrandType } from '@/components/BrandList/Brand';
import SearchBar from '@/components/SearchBar';
import { AiOutlineClose } from 'react-icons/ai';
import NextButton from '@/components/NextButton';
import ClothApi from '@/apis/domain/Cloth/ClothApi';
import CheckBoxTrue from '@/public/images/CheckBoxTrue.svg';
import CheckBoxFalse from '@/public/images/CheckBoxFalse.svg';
import Image from 'next/image';
import { BrandType } from '@/utils/types/OOTD.types';

interface BrandModalProps {
brandModalIsOpen: Boolean;
Expand Down
14 changes: 1 addition & 13 deletions components/Domain/AddCloth/ClothCategoryModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Title1 } from '@/components/UI';
import NextButton from '@/components/NextButton';
import ClothCategory from '@/components/ClothCategory';
import { AiOutlineClose } from 'react-icons/ai';
import { CategoryListType } from '@/utils/types/OOTD.types';

interface ClothCategoryModalProps {
isOpen: Boolean;
Expand All @@ -13,19 +14,6 @@ interface ClothCategoryModalProps {
categoryInitial?: CategoryListType[] | null;
}

export type CategoryType = {
id: number;
name: string;
state?: Boolean;
};

export type CategoryListType = {
id: number;
name: string;
state?: Boolean;
detailCategories?: CategoryType[];
};

export default function ClothCategoryModal({
isOpen,
setIsOpen,
Expand Down
6 changes: 1 addition & 5 deletions components/Domain/AddCloth/ClothSizeModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Body2, Title1 } from '@/components/UI';
import NextButton from '@/components/NextButton';
import ClothApi from '@/apis/domain/Cloth/ClothApi';
import { AiOutlineClose } from 'react-icons/ai';
import { SizeItem } from '@/utils/types/OOTD.types';

interface ClothSizeProps {
isOpen: Boolean;
Expand All @@ -14,11 +15,6 @@ interface ClothSizeProps {
clothSizeInitial: SizeItem | null;
}

export type SizeItem = {
id: number;
name: string;
};

export type SizeListType = SizeItem[][];

export default function ClothSizeModal({
Expand Down
3 changes: 2 additions & 1 deletion components/Domain/AddCloth/ColorModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import NextButton from '@/components/NextButton';
import { AiOutlineClose } from 'react-icons/ai';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import React from 'react';
import ColorList, { ColorListType } from '@/components/ColorList';
import ColorList from '@/components/ColorList';
import ClothApi from '@/apis/domain/Cloth/ClothApi';
import { ColorListType } from '@/utils/types/OOTD.types';
interface ColorModalProps {
isOpen: Boolean;
setIsOpen: Dispatch<SetStateAction<Boolean>>;
Expand Down
2 changes: 1 addition & 1 deletion components/Domain/AddCloth/WhereToBuyModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Input from '@/components/Input';
import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
import Modal from '@/components/Modal';
import NextButton from '@/components/NextButton';
import { ClothWhereBuy } from '@/pages/add-cloth';
import { ClothWhereBuy } from '@/utils/types/OOTD.types';
import { AiOutlineClose } from 'react-icons/ai';

interface WhereToBuyModal {
Expand Down
2 changes: 1 addition & 1 deletion components/Domain/AddOOTD/StyleModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import S from './style';
import { AiOutlineClose } from 'react-icons/ai';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import Input from '@/components/Input';
import { Style } from '@/pages/add-ootd';
import { Style } from '@/utils/types/OOTD.types';
import NextButton from '@/components/NextButton';
import Modal from '@/components/Modal';
import { OOTDApi } from '@/apis/domain/OOTD/OOTDApi';
Expand Down
2 changes: 1 addition & 1 deletion components/Domain/AddOOTD/TagModal/NewRegister/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Body3, Button3, Headline2 } from '@/components/UI';
import S from './style';
import { useRouter } from 'next/router';
import { ImageWithTag } from '..';
import { ImageWithTag } from '@/utils/types/OOTD.types';
import { useSetRecoilState } from 'recoil';
import { storedImageKey } from '@/utils/recoil/atom';

Expand Down
20 changes: 2 additions & 18 deletions components/Domain/AddOOTD/TagModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,14 @@ import useInfiniteScroll from '@/hooks/useInfiniteScroll';
import ClothApi from '@/apis/domain/Cloth/ClothApi';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { storedImageKey, userId } from '@/utils/recoil/atom';
import { UserClothDataType } from '../../OOTD/UserCloth';
import { UserClothDataType } from '@/utils/types/cloth.types';
import Spinner from '@/components/Spinner';
import useEffectAfterMount from '@/hooks/useEffectAfterMount';
import Toast from '@/components/Toast';
import { useRouter } from 'next/router';
import Alert from '@/components/Alert';
import Background from '@/components/Background';

export type ImageWithTag = {
ootdId: number;
ootdImage: string;
ootdImageClothesList?: {
clothesId: number;
clothesImage: string;
coordinate: { xrate: string; yrate: string };
deviceSize: { deviceWidth: number; deviceHeight: number };
caption: string;
size?: string;
state?: string;
name?: string;
brand?: string;
category?: string;
}[];
}[];
import { ImageWithTag } from '@/utils/types/OOTD.types';

interface AddTagProps {
setAddTag: Dispatch<SetStateAction<Boolean>>;
Expand Down
15 changes: 1 addition & 14 deletions components/Domain/Alarm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,7 @@ import Avatar from '@/public/images/Avatar.svg';
import { useRouter } from 'next/router';
import { AlarmApi } from '@/apis/domain/Alarm/AlarmApi';
import React from 'react';

export interface AlarmType {
id: number;
profileImage: string | null;
timeType: string;
timeStamp: string;
message: string;
userName: string;
content?: string;
contentImage?: string;
goUrl: string;
userId: number;
className: string;
}
import { AlarmType } from '@/utils/types/setting.types';

export default function Alarms({
id,
Expand Down
2 changes: 1 addition & 1 deletion components/Domain/Main/Explore/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from 'react';
import { useRouter } from 'next/router';
import useInfiniteScroll from '@/hooks/useInfiniteScroll';
import { OOTDApi } from '@/apis/domain/OOTD/OOTDApi';
import { OOTDListType } from '../../Search/SearchResult/ClosetCloth';
import { OOTDListType } from '@/utils/types/OOTD.types';
import useEffectAfterMount from '@/hooks/useEffectAfterMount';
import SubHead from '../../Search/SearchResult/SubHead';
import ImageList from '@/components/ImageList';
Expand Down
Loading