Skip to content

Commit

Permalink
refactor: 워케이션 후기 필터링 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
eunji0714 committed Aug 19, 2024
1 parent 7b41b56 commit ceae436
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ const UserWkDetailPage = ({ params }: UserWkDetailProps) => {
}}
/>
)}

{reviewData.reviewInfosForWkt.map((review) => (
<WkReviewInfo
key={review.wktTitle}
Expand Down
13 changes: 8 additions & 5 deletions src/app/_components/user/workation/WkReviewInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use client';

import React, { useState } from 'react';
import React from 'react';
import Image from 'next/image';
import { StarRateEmptyIcon, StarRateIcon } from '@/_assets/icons';
import UserFilteringSectionContainer from '@/_components/user/common/containers/UserFilteringSectionContainer';
import { ReviewInfo } from '@/_constants/common';
import dayjs from 'dayjs';

Expand Down Expand Up @@ -31,16 +30,20 @@ const WkReviewInfo = ({
<div className="my-5 flex items-center">
<p className="mr-4 text-h3 font-semibold">{reviewer}</p>
<p className="text-4 text-sub-200">
{department} + {title}
{department} · {title}
</p>
<div className="ml-auto flex flex-col justify-center">
<div className="mb-1 flex">
{[...Array(rating)].map((_, index) => (
<Image key={rating} src={StarRateIcon} alt="StarRateIcon" />
<Image
key={`star-filled-${index}`}
src={StarRateIcon}
alt="StarRateIcon"
/>
))}
{[...Array(5 - rating)].map((_, index) => (
<Image
key={rating}
key={`star-filled-${index}`}
src={StarRateEmptyIcon}
alt="StarRateEmptyIcon"
/>
Expand Down

0 comments on commit ceae436

Please sign in to comment.