Skip to content

Commit bb96df3

Browse files
committed
hotfix/현지님 PR CICD error해결
1 parent f5382bc commit bb96df3

8 files changed

Lines changed: 75 additions & 51 deletions

File tree

src/app/_api/notification/getNotification.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import axiosInstance from '@/lib/axios/axiosInstance';
2-
import { NotificationsType } from '@/lib/types/notificationType';
2+
import { NotificationType, NotificationsType } from '@/lib/types/notificationType';
33

44
const getNotifications = async () => {
5-
const response = await axiosInstance.get<NotificationsType>('/alarms');
5+
const response = await axiosInstance.get<NotificationType[]>('/alarms');
66

77
return response.data;
88
};

src/app/list/[listId]/_components/ListDetailOuter/Comment.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { vars } from '@/styles/__theme.css';
1919
import fallbackProfile from '/public/images/fallback_profileImage.webp';
2020
import EditPen from '/public/icons/edit_pen.svg';
2121
import { useLanguage } from '@/store/useLanguage';
22+
import { NewestCommentType } from '@/lib/types/listType';
2223

2324
/**
2425
* @todo 타입 정리 필요

src/app/list/[listId]/_components/ListDetailOuter/ListInformation.tsx

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,42 @@ import getBottomSheetOptionList from '@/app/list/[listId]/_components/ListDetail
3636
import ModalPortal from '@/components/modal-portal';
3737
import BottomSheet from '@/components/BottomSheet/BottomSheet';
3838
import Comment from '@/app/list/[listId]/_components/ListDetailOuter/Comment';
39+
import { CommentType } from '@/lib/types/commentType';
3940

4041
interface BottomSheetOptionsProps {
4142
key: string;
4243
title: string;
4344
onClick: () => void;
4445
}
46+
const convertToCommentType = (data: NewestCommentType): CommentType => ({
47+
id: 0, // 💡 `id`가 없으므로 기본값 0 설정
48+
userId: data.userId,
49+
userNickname: data.userNickname,
50+
userProfileImageUrl: data.userProfileImageUrl,
51+
createdDate: data.createdDate instanceof Date ? data.createdDate.toISOString() : new Date().toISOString(), // 💡 Date → string 변환
52+
updatedDate: new Date().toISOString(), // 💡 최신 상태로 기본값 추가
53+
content: data.content,
54+
replies: [], // 💡 `replies`가 없으므로 빈 배열 설정
55+
isDeleted: false, // 💡 기본값 false 설정
56+
});
4557

46-
const NewestComment = (data: NewestCommentType) => {
47-
return (
48-
<div>
49-
<Comment
50-
comment={data}
51-
setActiveNickname={() => {}}
52-
activeNickname={''}
53-
handleSetCommentId={() => {}}
54-
handleSetComment={() => {}}
55-
listId={11}
56-
commentId={22}
57-
// currentUserInfo={id: number,nickname: string description?: string profileImageUrl?: string backgroundImageUrl?: string followerCount: number followingCount: number isFollowed: boolean isOwner: boolean}
58-
handleEdit={() => {}}
59-
/>
60-
</div>
61-
);
62-
};
58+
// const NewestComment = ({ data }: { data: NewestCommentType }) => {
59+
// return (
60+
// <div>
61+
// <Comment
62+
// comment={convertToCommentType(data)}
63+
// setActiveNickname={() => {}}
64+
// activeNickname={''}
65+
// handleSetCommentId={() => {}}
66+
// handleSetComment={() => {}}
67+
// listId={11}
68+
// commentId={22}
69+
// // currentUserInfo={id: number,nickname: string description?: string profileImageUrl?: string backgroundImageUrl?: string followerCount: number followingCount: number isFollowed: boolean isOwner: boolean}
70+
// handleEdit={() => {}}
71+
// />
72+
// </div>
73+
// );
74+
// };
6375

6476
function ListInformation() {
6577
const { language } = useLanguage();
@@ -247,7 +259,8 @@ function ListInformation() {
247259
</div>
248260
</div>
249261
{/* TODO: 가장 최신 댓글 불러오는 부분 */}
250-
<NewestComment data={list?.newestComment} />
262+
{/* <NewestComment data={list?.newestComment} /> */}
263+
<div> list?.newestComment.content </div>{' '}
251264
</div>
252265
)}
253266
{isSheetActive && (

src/app/search/_components/SearchUserResult.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ function SearchUserResult() {
106106
<div className={styles.userProfiles}>
107107
{result?.users?.map((user) => (
108108
// TODO: getSearchUserResult에서 following여부를 같이 내려주게되면 isFollowing프롭 삭제
109-
<SearchUserProfile key={user.id} user={user} isFollowed={followingSet?.has(user.id) ?? false} />
109+
<SearchUserProfile
110+
key={user.id}
111+
user={user}
112+
isFollowed={followingSet instanceof Set ? followingSet.has(user.id) : false}
113+
/>
110114
))}
111115
{hasNextPage && <div ref={ref}></div>}
112116
</div>

src/app/search/_components/Top3CardSkeleton.tsx

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@ import * as styles from './Top3Card.css';
33

44
function Top3CardSkeleton() {
55
return (
6-
<div className={styles.card}>
7-
<div className={styles.skeletonListWrapper}>
8-
<ul>
9-
<ol className={styles.list}>
10-
{Array.from({ length: 3 }).map((_, index) => (
11-
<Skeleton variant="text" width="100%" height="2.5rem" animation="wave" key={index} />
12-
))}
13-
</ol>
14-
</ul>
6+
<div>Top3Card..css.ts 스타일 파일 필요합니다. </div>
7+
// <div className={styles.card}>
8+
// <div className={styles.skeletonListWrapper}>
9+
// <ul>
10+
// <ol className={styles.list}>
11+
// {Array.from({ length: 3 }).map((_, index) => (
12+
// <Skeleton variant="text" width="100%" height="2.5rem" animation="wave" key={index} />
13+
// ))}
14+
// </ol>
15+
// </ul>
1516

16-
<div className={styles.userProfiles}>
17-
<div className={styles.userImageWrapper}>
18-
<Skeleton variant="circular" width="30px" height="30px" animation="wave" />
19-
</div>
20-
<div className={styles.userTextWrapper}>
21-
<Skeleton variant="text" width="100%" height="1.4rem" animation="wave" />
22-
<Skeleton variant="text" width="100%" height="1.4rem" animation="wave" />
23-
</div>
24-
</div>
25-
</div>
26-
<Skeleton variant="text" width="100%" height="3rem" animation="wave" />
27-
</div>
17+
// <div className={styles.userProfiles}>
18+
// <div className={styles.userImageWrapper}>
19+
// <Skeleton variant="circular" width="30px" height="30px" animation="wave" />
20+
// </div>
21+
// <div className={styles.userTextWrapper}>
22+
// <Skeleton variant="text" width="100%" height="1.4rem" animation="wave" />
23+
// <Skeleton variant="text" width="100%" height="1.4rem" animation="wave" />
24+
// </div>
25+
// </div>
26+
// </div>
27+
// <Skeleton variant="text" width="100%" height="3rem" animation="wave" />
28+
// </div>
2829
);
2930
}
3031

src/components/SelectComponent/SelectComponent.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Select from 'react-select';
1+
import Select, { StylesConfig } from 'react-select';
22
import { vars } from '@/styles/__theme.css';
33

44
interface OptionsProps {
@@ -14,15 +14,15 @@ interface SelectProps {
1414
onChange?: any;
1515
}
1616

17-
const selectStyles = {
17+
const selectStyles: StylesConfig<OptionsProps, false> = {
1818
control: (provided: object, state: { isFocused: boolean }) => ({
1919
...provided,
2020
maxWidth: '320px',
2121
minWidth: '70px',
2222
textAlign: 'center',
2323
backgroundColor: 'transparent',
2424
boxShadow: 'none',
25-
border: 0,
25+
border: 'none',
2626
borderRadius: '8px',
2727
cursor: 'pointer',
2828
'&:hover': {

src/lib/types/notificationType.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export interface NotificationType {
1010
notice?: Notice;
1111
}
1212

13-
// export interface NotificationsType {
14-
// alarmList: NotificationType[];
15-
// }
13+
export interface NotificationsType {
14+
alarmList: NotificationType[];
15+
}
1616

1717
export type User = {
1818
id: number;

src/lib/utils/gtm.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1+
import Script from 'next/script';
2+
13
const GTM_CONTAINER_ID = process.env.NEXT_PUBLIC_GTM_ID;
2-
//Google Tag Manager
4+
5+
// Google Tag Manager
36
export const GtmScript = () => {
47
return (
5-
<script
8+
<Script
9+
id="google-tag-manager"
10+
strategy="afterInteractive"
611
dangerouslySetInnerHTML={{
712
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','${GTM_CONTAINER_ID}');`,
813
}}
914
/>
1015
);
1116
};
1217

13-
//Google Tag Manager - noscript
18+
// Google Tag Manager - noscript
1419
export const GtmNoScript = () => {
1520
return (
1621
<noscript>

0 commit comments

Comments
 (0)