Skip to content

Commit

Permalink
Fix: Lint오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
ssumai-kr committed Jul 14, 2024
1 parent 843bdfb commit 5103419
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion components/Lander/AllActivities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function AllActivity({
{title}
</div>
<div className="font-sans text-[28px] text-[20px] font-[700] p:mt-[0px] mt-[15px]">
{price} {' '}
{price}{' '}
<span className="font-sans text-[20px] text-[16px] font-[400]">
/ 인
</span>
Expand Down
8 changes: 5 additions & 3 deletions components/Lander/BestActivities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function BestActivity({
};

return (
<div onClick={handleClick}
<div
onClick={handleClick}
className="relative w-[384px] m:w-[186px] h-[384px] m:h-[186px] rounded-3xl border bg-gray-300 flex flex-col justify-center bg-[url('/image/Testimage.jpg')] cursor-pointer shrink-0 bg-cover bg-center"
style={{
backgroundImage: `linear-gradient(180deg, rgba(0, 0, 0, 0.00) 33.33%, rgba(0, 0, 0, 0.80) 91.67%), url(${bannerImageUrl})`,
Expand Down Expand Up @@ -76,7 +77,7 @@ function BestActivities() {
sort: 'most_reviewed',
page: 1,
size: 9,
}
};

const {
data: bestActivitiesData,
Expand Down Expand Up @@ -148,7 +149,8 @@ function BestActivities() {
) : (
<div>No activities found</div>
)}
{bestActivitiesDataNotPc?.activities && bestActivitiesDataNotPc.activities.length > 0 ? (
{bestActivitiesDataNotPc?.activities &&
bestActivitiesDataNotPc.activities.length > 0 ? (
<div className="flex gap-[32px] m:gap-[16px] mt-[34px] overflow-auto scrollbar-hide p:hidden">
{bestActivitiesDataNotPc.activities.map((item: ActivityDetail) => (
<BestActivity
Expand Down
9 changes: 5 additions & 4 deletions components/Lander/BestActivities.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export interface ActivityDetail {
}

export interface BestActivitiesProps {
activities: ActivityDetail[];
totalCount: number;
cursorId: number | null;
activities: ActivityDetail[];
totalCount: number;
cursorId: number | null;
}

export interface BestActivityProps {
Expand All @@ -25,4 +25,5 @@ export interface BestActivityProps {
rating: number;
reviewCount: number;
id: number;
}
bannerImageUrl: string;
}
13 changes: 7 additions & 6 deletions components/Lander/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import SearchBar from '../SearchBar/Searchbar';
import BestActivities from './BestActivities';
import AllActivities from './AllActivities';
import { useQuery } from '@tanstack/react-query';
import { getActivityListParams, getActivityListResponse } from '@/pages/api/activities/apiactivities.types';
import {
getActivityListParams,
getActivityListResponse,
} from '@/pages/api/activities/apiactivities.types';
import { getActivityList } from '@/pages/api/activities/apiactivities';
import Spinner from '../Spinner/Spinner';

Expand All @@ -31,18 +34,16 @@ function Main() {
queryFn: () => getActivityList(params),
});

if(isLoading) {
return (<Spinner />)
if (isLoading) {
return <Spinner />;
}

return (

<main className="flex flex-col justift-center items-center h-auto">
<section
className="z-0 w-screen h-[550px] m:h-[240px] overflow-hidden absolute left-0 top-[70px] bg-cover bg-center bg-[url('/image/Testimage.jpg')] flex items-center "
style={{
backgroundImage:
`linear-gradient(90deg, rgba(0, 0, 0, 0.60) 0%, rgba(0, 0, 0, 0.40) 100%), url(${BestOfmonth?.activities[0].bannerImageUrl})`,
backgroundImage: `linear-gradient(90deg, rgba(0, 0, 0, 0.60) 0%, rgba(0, 0, 0, 0.40) 100%), url(${BestOfmonth?.activities[0].bannerImageUrl})`,
}}
></section>
<div className="z-10 t:w-[696px] m:w-[343px]">
Expand Down
3 changes: 2 additions & 1 deletion components/Lander/Main.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface mainPageStateProps {
itemsPerPage: number;
selectedKategorie: string;
selectedSorted: string;
}
sortedName: string;
}
5 changes: 3 additions & 2 deletions components/PriceFilterBtn/PriceFilterBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default function PriceFilterBtn() {
sortedName: sortedName,
}));
setShowMenuList(false);
console.log(selectedPriceSorted);
};

return (
Expand Down Expand Up @@ -68,7 +67,9 @@ export default function PriceFilterBtn() {
</button>
<button
className="flex justify-center items-center text-[18px] m:text-[14px] border border-solid border-var-gray3 border-t-0 w-[147px] t:w-[120px] m:w-[90px] h-[58px] m:h-[41px] rounded-b-[8px] bg-white hover:bg-var-gray2"
onClick={() => changeSelectedSort('most_reviewed', '리뷰 많은 순')}
onClick={() =>
changeSelectedSort('most_reviewed', '리뷰 많은 순')
}
>
리뷰 많은 순
</button>
Expand Down

0 comments on commit 5103419

Please sign in to comment.