Skip to content

Commit

Permalink
create new compt
Browse files Browse the repository at this point in the history
  • Loading branch information
ocitocit committed Oct 15, 2023
1 parent 55eb6cf commit 21863ef
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions app/favorites/FavoritesClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
'use Client';

import Container from '@/components/Container';
import Heading from '@/components/Heading';
import ListingCard from '@/components/listings/ListingCard';
import { SafeListing, SafeUser } from '@/types';

interface FavoritesClientProps {
listings: SafeListing[];
currentUser?: SafeUser | null;
}

const FavoritesClient: React.FC<FavoritesClientProps> = ({
listings,
currentUser
}) => {
return (
<Container>
<Heading
title="Favorites"
subTitle="List of places you have favorited!"
/>
<div
className="
mt-10
grid
grid-cols-1
gap-8
sm:grid-cols-2
md:grid-cols-3
lg:grid-cols-4
xl:grid-cols-5
2xl:grid-cols-6
"
>
{listings.map((listing) => (
<ListingCard
key={listing.id}
currentUser={currentUser}
data={listing}
/>
))}
</div>
</Container>
);
};
export default FavoritesClient;

0 comments on commit 21863ef

Please sign in to comment.