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
3 changes: 3 additions & 0 deletions public/icons/new/back_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/new/history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/icons/new/vertical_kebab_button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/icons/ver3/bookmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/icons/ver3/detail_share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions public/icons/ver3/more.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icons/ver3/reaction_agree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icons/ver3/reaction_good.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icons/ver3/reaction_thanks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/icons/ver3/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/visibility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/app/_api/notification/getNotification.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axiosInstance from '@/lib/axios/axiosInstance';
import { NotificationsType } from '@/lib/types/notificationType';
import { NotificationType, NotificationsType } from '@/lib/types/notificationType';

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

return response.data;
};
Expand Down
8 changes: 8 additions & 0 deletions src/app/_api/reaction/Reaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import axiosInstance from '@/lib/axios/axiosInstance';
import { ReactionType } from '@/lib/types/reactionType';

const reaction = async (listId: number, type: ReactionType) => {
return await axiosInstance.post(`/lists/${listId}/reaction`, { reaction: type });
};

export default reaction;
6 changes: 3 additions & 3 deletions src/app/_api/search/getSearchListResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ interface GetSearchListResultType {
cursorId: number | undefined | null;
sort: string;
keyword: string;
category: string;
categoryCode: string;
}

async function getSearchListResult({ sort, keyword, category, cursorId }: GetSearchListResultType) {
async function getSearchListResult({ sort, keyword, categoryCode, cursorId }: GetSearchListResultType) {
const params = new URLSearchParams({
size: '6',
});
Expand All @@ -17,7 +17,7 @@ async function getSearchListResult({ sort, keyword, category, cursorId }: GetSea
}

const response = await axiosInstance.get(
`/lists/search?keyword=${keyword}&sort=${sort}&category=${category}&${params.toString()}`
`/lists/search?keyword=${keyword}&sort=${sort}&categoryCode=${categoryCode}&${params.toString()}`
);

return response.data;
Expand Down
9 changes: 8 additions & 1 deletion src/app/_api/search/getSearchUserResult.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import axiosInstance from '@/lib/axios/axiosInstance';

interface GetSearchUserResultType {
// cursorId: number | undefined | null;
page: number | undefined | null;
keyword: string;
}

async function getSearchUserResult({ keyword }: GetSearchUserResultType) {
async function getSearchUserResult({ keyword, page }: GetSearchUserResultType) {
console.log('page:::', page);
const params = new URLSearchParams({
size: '3',
});

if (page) {
params.append('page', page.toString());
}

const response = await axiosInstance.get(`/users?search=${keyword}&${params.toString()}`);

return response.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const myCollectWrapper = style({
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
gap: '6px',
});

export const collectWrapper = style([
Expand All @@ -13,3 +14,10 @@ export const collectWrapper = style([
cursor: 'pointer',
},
]);

export const collectTextWrapper = style({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { useUser } from '@/store/useUser';
import numberFormatter from '@/lib/utils/numberFormatter';
import collectList from '@/app/_api/collect/__collectList';
import toasting from '@/lib/utils/toasting';
import CollectIcon from '/public/icons/collect.svg';
import CollectedIcon from '/public/icons/collected.svg';
import BookmarkIcon from '/public/icons/ver3/bookmark.svg';
import BookmarkedIcon from '/public/icons/collected.svg';
import Modal from '@/components/Modal/Modal';
import LoginModal from '@/components/login/LoginModal';
import useBooleanOutput from '@/hooks/useBooleanOutput';
Expand Down Expand Up @@ -74,7 +74,7 @@ const CollectButton = ({ data }: { data: CollectProps }) => {
return (
<>
<div className={styles.collectWrapper}>
<CollectIcon onClick={handleSetOn} />
<BookmarkIcon onClick={handleSetOn} />
</div>
{isOn && (
<Modal handleModalClose={handleSetOff} size="large">
Expand All @@ -89,15 +89,22 @@ const CollectButton = ({ data }: { data: CollectProps }) => {
if (loginUser?.id === data.ownerId) {
return (
<div className={styles.myCollectWrapper}>
<CollectedIcon />
<div>{numberFormatter(data.collectCount, 'ko') ?? 0}</div>
<BookmarkIcon />

<div className={styles.collectTextWrapper}>
<p>콜렉트</p>
{loginUser?.id === data.ownerId && <p>({numberFormatter(data.collectCount, 'ko') ?? 0})</p>}
</div>
</div>
);
}

return (
<div className={styles.collectWrapper} onClick={handleCollect}>
{data.isCollected ? <CollectedIcon /> : <CollectIcon />}
{data.isCollected ? <BookmarkedIcon width={24} height={24} /> : <BookmarkIcon />}
<div className={styles.collectTextWrapper}>
<p>콜렉트</p>
</div>
</div>
);
};
Expand Down
Loading