Skip to content

Commit

Permalink
[fix] liked 페이지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
zestlee1106 committed Dec 26, 2023
1 parent cc395ec commit 740b06b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 34 deletions.
4 changes: 3 additions & 1 deletion components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export default function Header({

return (
<div
className={`${backGroundColor} w-full h-[54px] text-center z-[999] fixed max-w-max ${styles.container} border-b-[1px]`}
className={`${backGroundColor} w-full h-[54px] text-center z-[999] fixed max-w-max ${styles.container} ${
bgColor !== 'transparent' ? 'border-b-[1px]' : ''
}`}
>
{type === 'logo' && (
<div className="flex w-full">
Expand Down
37 changes: 4 additions & 33 deletions pages/liked/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useRef, useEffect, useState } from 'react';
import NoLiked from '@/public/icons/noLiked.svg';
import useModal from '@/hooks/useModal';
import DefaultLayout from '@/components/layouts/DefaultLayout';
import { Nav, Typography, Chip } from '@/components/index.tsx';
import { Nav, Typography, Chip, Select } from '@/components/index.tsx';
import { useRouter } from 'next/router';
import { RoomSearch } from '@/public/types/room';
import { getLikedRooms } from '@/api/userInfo';
Expand Down Expand Up @@ -180,29 +180,9 @@ export default function Liked({ roomInfo }: MyPostingProps) {
};
return (
<div>
<div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap' }} className="mb-[8px]">
<FilterImg
className="stroke-g7 stroke-[2] cursor-pointer "
onClick={openFilterPopup}
style={{ alignSelf: 'flex-start' }}
/>
{filters.map((label, index) => {
return (
<div style={{ marginLeft: index === 0 ? '4px' : '0', marginRight: '-4px' }} key={index}>
<Chip
key={`${label}-${index}`}
label={label}
onDelete={() => handleOptionRemove?.(label, index)}
onChipClick={() => handleChipClick?.(label)}
clicked={handlePropsClick?.(label, index)}
/>
</div>
);
})}
<div className="font-semibold pt-[16px]">
You have liked <span className="text-r1">{totalElements} rooms</span>
</div>
<Typography variant="body" customClassName="text-left font-bold text-[16px] text-g7">
There are <span className="text-r1">{`${totalElements} rooms`}</span> in total!
</Typography>
{rooms.map((room, idx) => (
<div className={`mt-[20px] ${rooms.length - 1 === idx ? 'mb-[83px]' : ''}`} key={`room-${idx}`}>
<RoomCard room={room} onClick={() => handleCardClick(room.id)} isLikedRooms />
Expand All @@ -223,17 +203,8 @@ export default function Liked({ roomInfo }: MyPostingProps) {
}

Liked.getLayout = function getLayout(page: React.ReactElement) {
const handleGoBack = () => {
window.history.back();
};
return (
<DefaultLayout
type="title"
title="Liked"
handleButtonClick={handleGoBack}
titleStyle="pt-[14.5px] font-pretendard font-medium text-[18px]"
titleCenter
>
<DefaultLayout type="title" title="Liked" titleCenter>
{page}
</DefaultLayout>
);
Expand Down

0 comments on commit 740b06b

Please sign in to comment.