Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
dfaa803
refctor: accountCancel currentId
lalaurrel Dec 29, 2024
2b0feb6
refactor: accountSetting currentId
lalaurrel Dec 29, 2024
694731b
refactor: profile currentId
lalaurrel Dec 29, 2024
cc9ed23
refactor: 글씨 색상 수정
lalaurrel Dec 29, 2024
6e0027e
refactor: profileEdit currentId
lalaurrel Dec 29, 2024
c15e7f1
Refactor: PostImageSelect 리팩토링
xxinzzi Dec 31, 2024
2d324bf
Refactor: PostUpload 리팩토링
xxinzzi Dec 31, 2024
9ff753d
Refator: 컬러시스템 적용
xxinzzi Jan 2, 2025
19d5a4a
Refactor: Icon 컴포넌트 적용
xxinzzi Jan 2, 2025
5c09412
Remove: 잘못 생성된 파일 삭제
xxinzzi Jan 2, 2025
8541088
refactor: text.tertiar로 접근
lalaurrel Jan 2, 2025
04ae98b
Refact: eslint-plugin-import 적용 테스트
mimizae Jan 4, 2025
9ceb44c
Merge pull request #124 from oodd-team/feat/OD-173
gustn99 Jan 5, 2025
0054a53
Merge pull request #125 from oodd-team/feat/OD-169
gustn99 Jan 5, 2025
ae03831
Merge pull request #126 from oodd-team/feat/OD-172
gustn99 Jan 5, 2025
8106a5b
Fix: apis 린트 오류 수정
gustn99 Jan 5, 2025
da6141f
Fix: TopBarLayout의 props를 전체 TopBarProps가 아닌 $withBorder로 수정
gustn99 Jan 5, 2025
6be0f0c
Fix: pages 린트 오류 수정
gustn99 Jan 5, 2025
c01651f
Fix: GlobalStyles 린트 오류 수정
gustn99 Jan 5, 2025
ed4c7fc
Fix: 게시글 상세 조회 페이지에서 프로필 클릭 시 라우팅 경로 수정
gustn99 Jan 5, 2025
37f0db6
Feat: Feed 컴포넌트에 relativeTime 플로그인 추가
gustn99 Jan 5, 2025
16eff7e
Fix: getCurrentUserId로 받아오는 모든 개별 변수명을 currentUserId로 통일
gustn99 Jan 5, 2025
4f11bbf
Fix: 남아 있던 users 경로 삭제
gustn99 Jan 5, 2025
1d54d0e
Fix: 컬러시스템 오적용 수정
gustn99 Jan 5, 2025
8672062
Fix: StyledText에 남아 있는 lineHeight 삭제
gustn99 Jan 5, 2025
cb83aab
Fix: PostBase & Profile 일부 코드 흐름 수정
gustn99 Jan 5, 2025
d459005
Fix: 불필요한 커서 포인터 css 제거
gustn99 Jan 5, 2025
d3fea10
Fix: Home 전체 게시글 조회 에러 모달 제거
gustn99 Jan 5, 2025
fc4ebb7
Fix: PostItem & UserProfile을 components 폴더에서 Profile 폴더로 이동
gustn99 Jan 5, 2025
ba87c20
Merge pull request #127 from oodd-team/feat/OD-159
gustn99 Jan 5, 2025
765b322
Design: 채팅 입력바 디자인 수정
gustn99 Jan 5, 2025
28bc09c
Merge pull request #128 from oodd-team/feat/OD-159
gustn99 Jan 5, 2025
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
1 change: 1 addition & 0 deletions src/apis/auth/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { newRequest } from '@apis/core';

import type { getUserInfoByJwtResponse } from './dto';

// jwt로 사용자 정보 조회 api /auth/me
Expand Down
2 changes: 1 addition & 1 deletion src/apis/chatting/dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface chatRoomMessagesData {
fromUser: FromUserDto;
toUser: ToUserDto;
createdAt: string;
toUserReadAt: any;
toUserReadAt: Date;
}

export interface FromUserDto {
Expand Down
1 change: 1 addition & 0 deletions src/apis/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import axios, {
AxiosResponse,
InternalAxiosRequestConfig,
} from 'axios';

import { NEW_JWT_KEY } from '../../config/constant';

// 기존 서버 응답 타입
Expand Down
1 change: 1 addition & 0 deletions src/apis/matching/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { newRequest } from '@apis/core';

import type {
CreateMatchingRequest,
CreateMatchingResponse,
Expand Down
2 changes: 1 addition & 1 deletion src/apis/post-comment/dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Content {
content: string;
}

interface CreateCommentData extends Content {}
type CreateCommentData = Content;

export interface Comment {
id: number;
Expand Down
8 changes: 5 additions & 3 deletions src/apis/post-comment/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { newRequest } from '../core';
import { CreateCommentRequest, CreateCommentResponse, GetCommentListResponse } from './dto';
import { EmptySuccessResponse } from '../core/dto';
import { newRequest } from '@apis/core';

import type { EmptySuccessResponse } from '@apis/core/dto';

import type { CreateCommentRequest, CreateCommentResponse, GetCommentListResponse } from './dto';

// 게시글 댓글 생성 API
export const createCommentApi = (postId: number, data: CreateCommentRequest) =>
Expand Down
4 changes: 2 additions & 2 deletions src/apis/post-like/dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseSuccessResponse } from '../core/dto';
import { PaginationMeta } from '../util/dto';
import type { BaseSuccessResponse } from '@apis/core/dto';
import type { PaginationMeta } from '@apis/util/dto';

// 좋아요 누르기/취소
export type TogglePostLikeStatusResponse = BaseSuccessResponse<TogglePostLikeStatusData>;
Expand Down
5 changes: 3 additions & 2 deletions src/apis/post-like/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { newRequest } from '../core';
import { TogglePostLikeStatusResponse, GetPostLikeListResponse } from './dto';
import { newRequest } from '@apis/core';

import type { TogglePostLikeStatusResponse, GetPostLikeListResponse } from './dto';

// 게시글 좋아요 누르기/취소
export const togglePostLikeStatusApi = (postId: number) =>
Expand Down
25 changes: 12 additions & 13 deletions src/apis/post-report/dto.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
import { BaseSuccessResponse } from '../core/dto';
import type { BaseSuccessResponse } from '@apis/core/dto';

interface BaseReport {
id: number; // 신고 ID
userId: number; // 신고 생성 사용자 ID
postId: number; // 신고된 게시글 ID
content: string; // 신고된 게시글 내용
repostReason: string; // 신고 사유
id: number; // 신고 ID
userId: number; // 신고 생성 사용자 ID
postId: number; // 신고된 게시글 ID
content: string; // 신고된 게시글 내용
repostReason: string; // 신고 사유
}

// 게시글 신고 요청 DTO
export interface SendPostReportRequest {
requesterId: number; // 신고하는 사용자 ID
postId: number; // 신고 대상 게시글 ID
reason: string; // 신고 사유
requesterId: number; // 신고하는 사용자 ID
postId: number; // 신고 대상 게시글 ID
reason: string; // 신고 사유
}

// 게시물 신고 응답 데이터
export interface SendPostReportData extends BaseReport {
requesterId: number; // 신고하는 사용자 ID
postId: number; // 신고 대상 게시글 ID
reason: string; // 신고 사유
requesterId: number; // 신고하는 사용자 ID
postId: number; // 신고 대상 게시글 ID
reason: string; // 신고 사유
}

// 게시물 신고 응답 타입
export type SendPostReportResponse = BaseSuccessResponse<SendPostReportData>;

7 changes: 4 additions & 3 deletions src/apis/post-report/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { newRequest } from "../core";
import { SendPostReportRequest, SendPostReportResponse } from "./dto";
import { newRequest } from '@apis/core';

import type { SendPostReportRequest, SendPostReportResponse } from './dto';

// 게시글 신고 API
export const sendPostReportApi = (data: SendPostReportRequest) =>
newRequest.post<SendPostReportResponse>('/post-report', data);
newRequest.post<SendPostReportResponse>('/post-report', data);
6 changes: 3 additions & 3 deletions src/apis/post/dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseSuccessResponse } from '../core/dto';
import { PaginationMeta } from '../util/dto';
import type { BaseSuccessResponse } from '@apis/core/dto';
import type { PaginationMeta } from '@apis/util/dto';

// 게시글 생성
//request
Expand Down Expand Up @@ -28,7 +28,7 @@ export interface PostBase {
postClothings?: PostClothing[] | null;
isRepresentative: boolean;
}
export interface CreatePostData extends PostBase {}
export type CreatePostData = PostBase;
export interface PostSummary {
id: number;
content: string;
Expand Down
8 changes: 5 additions & 3 deletions src/apis/post/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { newRequest } from '../core';
import {
import { newRequest } from '@apis/core';

import type { EmptySuccessResponse } from '@apis/core/dto';

import type {
CreatePostRequest,
CreatePostResponse,
GetPostListResponse,
Expand All @@ -8,7 +11,6 @@ import {
ModifyPostRequest,
ModifyPostResponse,
} from './dto';
import { EmptySuccessResponse } from '../core/dto';

// 게시글 생성
export const createPostApi = (data: CreatePostRequest) => newRequest.post<CreatePostResponse>('/post', data);
Expand Down
2 changes: 2 additions & 0 deletions src/apis/user-block/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { newRequest } from '@apis/core';

import type { EmptySuccessResponse } from '@apis/core/dto';

import type { PostUserBlockRequest } from './dto';

// 유저 차단 api
Expand Down
2 changes: 2 additions & 0 deletions src/apis/user-report/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { newRequest } from '@apis/core';

import type { EmptySuccessResponse } from '@apis/core/dto';

import type { PostUserReportRequest } from './dto';

// 유저 신고 api
Expand Down
2 changes: 2 additions & 0 deletions src/apis/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { newRequest } from '@apis/core';

import type { EmptySuccessResponse } from '@apis/core/dto';

import type {
GetUserInfoResponse,
PatchUserInfoRequest,
Expand Down
2 changes: 1 addition & 1 deletion src/assets/default/send-message.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/BottomButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const BottomButton: React.FC<BottomButtonProps> = ({ content, onClick, disabled
return (
<ButtonWrapper>
<Button onClick={onClick} disabled={disabled}>
<StyledText $textTheme={{ style: 'body1-regular', lineHeight: 2 }}>{content}</StyledText>
<StyledText $textTheme={{ style: 'body1-regular' }}>{content}</StyledText>
</Button>
</ButtonWrapper>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/ClothingInfoItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const ClothingInfoItem: React.FC<ClothingInfoItemProps> = ({ clothingObj, onDele
<img src={clothingObj.imageUrl} alt="ClothingImg" />
</ClothingImage>
<div className="infoDetail">
<StyledText className="brand" $textTheme={{ style: 'body2-bold', lineHeight: 2 }}>
<StyledText className="brand" $textTheme={{ style: 'body2-bold' }}>
{clothingObj.brandName}
</StyledText>
<ClothingModel className="model" $textTheme={{ style: 'body4-light', lineHeight: 1 }}>
<ClothingModel className="model" $textTheme={{ style: 'body4-light' }}>
{clothingObj.modelName}
</ClothingModel>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ClothingInfoItem/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const ClothingInfoLeft = styled.div`

.model {
margin-right: auto;
color: ${({ theme }) => theme.colors.black};
color: ${({ theme }) => theme.colors.text.primary};
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
Expand Down
6 changes: 3 additions & 3 deletions src/components/ConfirmationModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ConfirmationModal: React.FC<ConfirmationModalProps> = ({
>
<ConfirmationModalLayout>
<ContentBox>
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.black}>
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.primary}>
{content}
</StyledText>
</ContentBox>
Expand All @@ -36,14 +36,14 @@ const ConfirmationModal: React.FC<ConfirmationModalProps> = ({
onCloseModal();
}}
>
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.black}>
<StyledText $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.primary}>
취소
</StyledText>
</Button>
</>
)}
<Button onClick={confirm.action}>
<StyledText $textTheme={{ style: 'body2-regular', lineHeight: 1.5 }} color={'#F00'}>
<StyledText $textTheme={{ style: 'body2-regular' }} color={'#F00'}>
{confirm.text}
</StyledText>
</Button>
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/Alarm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const Alarm: React.FC<IconsProps> = ({ isFilled = false, width = '14', height = '18' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/Heart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const Heart: React.FC<IconsProps> = ({ isFilled = false, width = '56', height = '56' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const Home: React.FC<IconsProps> = ({ color = '', isFilled = false, width = '14', height = '14' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/Like.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const Like: React.FC<IconsProps> = ({ isFilled = false, color = '', width = '16', height = '14' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const Message: React.FC<IconsProps> = ({ color = '', isFilled = false, width = '14', height = '12' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/MyPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const MyPage: React.FC<IconsProps> = ({ color = '', isFilled = false, width = '16', height = '16' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Icons/Photo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { IconsProps } from './dto';

const Photo: React.FC<IconsProps> = ({ width = '18', height = '18', color = '#8E8E8E' }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Text/dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface FontStylesByPlatform {
export interface StyledTextProps {
$textTheme: {
style: FontStyleKey | FontStylesByPlatform;
lineHeight?: number;
};
color?: string;
children: unknown;
Expand Down
3 changes: 1 addition & 2 deletions src/components/TopBar/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import theme from '@styles/theme';

import { StyledText } from '@components/Text/StyledText';

import type { TopBarLayoutProps } from './dto';
export const TopBarLayout = styled.header<TopBarLayoutProps>`
export const TopBarLayout = styled.header<{ $withBorder: boolean }>`
display: flex;
position: sticky;
top: 0; /* 부모 요소의 상단에 붙도록 설정 */
Expand Down
26 changes: 10 additions & 16 deletions src/pages/Account/AccountCancel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom';
import theme from '@styles/theme';

import { patchUserWithdrawApi } from '@apis/user';
import { getCurrentUserId } from '@utils/getCurrentUserId';

import back from '@assets/arrow/left.svg';

Expand All @@ -23,8 +24,7 @@ import {
CheckboxInput,
Label,
StyledCheckboxText,
StyledDiv,
} from './styles'; // 상대 경로 index 명시
} from './styles';

const AccountCancel: React.FC = () => {
const [isChecked, setIsChecked] = useState(false);
Expand All @@ -49,23 +49,20 @@ const AccountCancel: React.FC = () => {
return;
}

const storedUserId = Number(localStorage.getItem('my_id'));
const currentUserId = getCurrentUserId();
const token = localStorage.getItem('new_jwt_token');

if (!storedUserId || !token) {
if (!currentUserId || !token) {
setModalContent('사용자 정보를 찾을 수 없습니다.');
setIsModalVisible(true);
return;
}

// API 요청
const response = await patchUserWithdrawApi(storedUserId);
const response = await patchUserWithdrawApi(currentUserId);

if (response.isSuccess) {
setModalContent('계정이 성공적으로 삭제되었습니다.');
setIsModalVisible(true);

// 계정 삭제 시 localStorage에서 사용자 정보 제거
localStorage.clear();

setTimeout(() => {
Expand All @@ -86,14 +83,13 @@ const AccountCancel: React.FC = () => {
<OODDFrame>
<CancelContainer>
<TopBar text="회원 탈퇴" LeftButtonSrc={back} onClickLeftButton={() => navigate(-1)} />

<SubTitle>
<StyledText as="div" $textTheme={{ style: 'headline2-medium' }} color={theme.colors.primary}>
<StyledText as="div" $textTheme={{ style: 'headline2-medium' }} color={theme.colors.text.primary}>
OOTD 탈퇴 전 확인하세요!
</StyledText>
</SubTitle>
<Text as="div">
<StyledText as="div" $textTheme={{ style: 'caption1-regular' }} color={theme.colors.primary}>
<StyledText as="div" $textTheme={{ style: 'caption1-regular' }} color={theme.colors.text.primary}>
{`탈퇴하시면 이용 중인 서비스가 폐쇄되며,\n모든 데이터는 복구할 수 없습니다.`}
</StyledText>
</Text>
Expand All @@ -102,7 +98,7 @@ const AccountCancel: React.FC = () => {
<StyledText
as="div"
$textTheme={{ style: 'body1-medium' }}
color={theme.colors.primary}
color={theme.colors.text.primary}
style={{ whiteSpace: 'nowrap' }}
>
지금까지 OODD를 이용해주셔서 감사합니다!
Expand All @@ -118,12 +114,10 @@ const AccountCancel: React.FC = () => {
</Label>
</CheckboxWrapper>
</CancelContainer>
<StyledDiv isChecked={isChecked}>
<BottomButton content="탈퇴하기" onClick={handleDeleteAccount} disabled={!isChecked} />
</StyledDiv>
<BottomButton content="탈퇴하기" onClick={handleDeleteAccount} disabled={!isChecked} />
{isModalVisible && (
<Modal
content={modalContent || ''} // null일 경우 빈 문자열로 처리
content={modalContent || ''}
onClose={handleModalClose}
isCloseButtonVisible={true}
button={{ content: '확인', onClick: handleModalClose }}
Expand Down
Loading
Loading