Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const CommunityEdit = () => {
const navigate = useNavigate();
const queryClient = useQueryClient();
const { postId } = useParams<{ postId: string }>();
const { uploadImageFiles } = useImageUpload();

if (!postId) {
throw new Error('게시글 Id가 존재하지 않습니다.');
Expand All @@ -55,8 +56,6 @@ const CommunityEdit = () => {
},
});

const { uploadImageFiles } = useImageUpload();

if (!feedDetailData) {
throw new Error(
'글 수정 페이지에서 원본 피드 데이터를 불러오지 못했습니다.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ import * as styles from './comment-input-box.css';

interface CommentInputBoxProps {
value: string;
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
errorState?: boolean;
onSubmit: (file?: File) => void;
focusKey?: string;
selectedFile: File | null;
errorState?: boolean;
previewUrl?: string;
onImageChange: (file: File | null) => void;
selectedFile: File | null;
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
onSubmit: (file?: File) => void;
onClearImage?: () => void;
onImageChange: (file: File | null) => void;
}

const CommentInputBox = ({
value,
onChange,
errorState,
onSubmit,
focusKey,
selectedFile,
errorState,
previewUrl,
onImageChange,
selectedFile,
onChange,
onSubmit,
onClearImage,
onImageChange,
}: CommentInputBoxProps) => {
const fileInputRef = useRef<HTMLInputElement>(null);
const wrapperRef = useRef<HTMLElement>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as styles from './community-line.css';

interface CommunityLineProps {
value: string;
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
onSubmit?: () => void;
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
}

const CommunityLine = ({ value, onChange, onSubmit }: CommunityLineProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ import { Image } from '@shared/types/type.ts';
import * as styles from './feed-detail-info.css';

interface FeedDetailInfoProps {
title: string;
content: string;
nickname: string;
imageUrl: Image[];
createdAt: string;
profileImage: string;
isOwner: boolean;
imageUrl: Image[];
title: string;
content: string;
onEditClick: () => void;
onDeleteClick: () => void;
}

export const FeedDetailInfo = ({
title,
content,
nickname,
imageUrl,
createdAt,
profileImage,
isOwner,
imageUrl,
title,
content,
onEditClick,
onDeleteClick,
}: FeedDetailInfoProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ import { getTimeAgo } from '@shared/utils/utils';
import * as styles from './feed-list-item.css';

interface FeedListItemProps {
title?: string;
text?: string;
writerNickname?: string;
title?: string;
createdAt?: string;
commentCount?: number;
likeCount?: number;
commentCount?: number;
writerNickname?: string;
profileImageUrl: string;
isLiked?: boolean;
onClick: () => void;
profileImageUrl: string;
}

const FeedListItem = ({
title,
text,
writerNickname,
title,
createdAt,
commentCount,
likeCount,
commentCount,
writerNickname,
profileImageUrl,
isLiked,
onClick,
profileImageUrl,
}: FeedListItemProps) => {
return (
<div className={styles.container} onClick={onClick}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { routePath } from '@shared/router/path';
import * as styles from './account-menu-bar.css';

const AccountMenuBar = () => {
const { openModal, closeModal } = useModal();
const queryClient = useQueryClient();

const { mutate: kakaoLogout } = useMutation({
Expand All @@ -36,7 +37,6 @@ const AccountMenuBar = () => {
authService.logout();
},
});
const { openModal, closeModal } = useModal();

const handleLogout = () => {
openModal(
Expand Down
1 change: 1 addition & 0 deletions apps/client/src/widgets/mypage/components/body/body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const Body = ({ nickname, profileImage }: ContentProps) => {

const handleProfileEdit = () => {
toggleEditing();

if (isEditing) {
handlePatchUserProfile();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ interface AccordionPanelStyle extends React.CSSProperties {
}

export const Accordion = ({ children }: accordionProps) => {
const defaultExpanded = false;

return (
<AccordionContextProvider defaultExpanded={defaultExpanded}>
<AccordionContextProvider defaultExpanded={false}>
<div className={styles.accordionContainer}>{children}</div>
</AccordionContextProvider>
);
Expand Down
4 changes: 1 addition & 3 deletions apps/client/src/widgets/report/components/ipwon/ipwon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ interface IpwonProps {
reportId: string;
}

const TEXT_TITLE = '입원';

const IPWON_COMPONENT = [
{ Component: Jilbyeong, key: ACCORDION_CATEGORY.IPWON.JILBYEONG },
{ Component: Sanghae, key: ACCORDION_CATEGORY.IPWON.SANGHAE },
Expand Down Expand Up @@ -54,7 +52,7 @@ const Ipwon = ({ sectionData, reportId }: IpwonProps) => {

return (
<div className={styles.container}>
<Divider>{TEXT_TITLE}</Divider>
<Divider>입원</Divider>
<div className={styles.contentContainer}>
<InfoBox
description={sectionData?.additionalInfo}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ interface MaturityProps {
age: number;
}

const MATURITY = '만기';
const AGELABEL = '세';

const Maturity = ({ age }: MaturityProps) => {
return (
<div className={styles.maturityContainer}>
<p>{MATURITY}</p>
<p>
{age}
{AGELABEL}
</p>
<p>만기</p>
<p>{age}세</p>
</div>
);
};
Expand Down
7 changes: 2 additions & 5 deletions apps/client/src/widgets/report/components/price/price.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ interface PriceProps {
price: number;
}

const MONTH = '월';
const WON = '원';

const Price = ({ price }: PriceProps) => {
const formattedPrice = formatPrice(price);

return (
<div className={styles.priceContainer}>
<p className={styles.month}>{MONTH}</p>
<p className={styles.month}></p>
<p className={styles.price}>{formattedPrice}</p>
<p>{WON}</p>
<p></p>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ interface RecommendProps {
reasonList: string[];
}

const REASON = '추천 이유';
const BULLET = '\u2022';

const Recommend = ({ reasonList }: RecommendProps) => {
Expand All @@ -21,7 +20,7 @@ const Recommend = ({ reasonList }: RecommendProps) => {
height="1.92rem"
/>
</div>
<p className={styles.reason}>{REASON}</p>
<p className={styles.reason}>추천 이유</p>
</div>
<ul className={styles.bottomContainer}>
{reasonList.map((item, index) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ interface SamangProps {
reportId: string;
}

const TEXT_TITLE = '사망';

const SAMANG_COMPONENT = [
{ Component: Jilbyeong, key: ACCORDION_CATEGORY.SAMANG.JILBYEONG },
{ Component: Sanghae, key: ACCORDION_CATEGORY.SAMANG.SANGHAE },
Expand Down Expand Up @@ -54,7 +52,7 @@ const Samang = ({ sectionData, reportId }: SamangProps) => {

return (
<div className={styles.container}>
<Divider>{TEXT_TITLE}</Divider>
<Divider>사망</Divider>
<div className={styles.contentContainer}>
<InfoBox
description={sectionData?.additionalInfo}
Expand Down
4 changes: 1 addition & 3 deletions apps/client/src/widgets/report/components/susul/susul.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ interface SusulProps {
reportId: string;
}

const TEXT_TITLE = '수술';

const SUSUL_COMPONENTS = [
{
Component: Jilbyeong,
Expand Down Expand Up @@ -70,7 +68,7 @@ const Susul = ({ sectionData, reportId }: SusulProps) => {

return (
<div className={styles.container}>
<Divider>{TEXT_TITLE}</Divider>
<Divider>수술</Divider>
<div className={styles.infoContainer}>
<InfoBox
description={sectionData?.additionalInfo}
Expand Down
5 changes: 4 additions & 1 deletion apps/client/src/widgets/report/hooks/use-move-scroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ export const useActiveSection = (scrollRefs: ScrollRefs) => {
};

window.addEventListener('scroll', onScroll);
return () => window.removeEventListener('scroll', onScroll);

return () => {
window.removeEventListener('scroll', onScroll);
};
}, [scrollRefs]);

const handleCategoryClick = (category: HOME_CATEGORY_TAB) => {
Expand Down