Skip to content

Commit

Permalink
Merge pull request #50 from Lorg0n/feature/AddAdditionalInformationTo…
Browse files Browse the repository at this point in the history
…Cards

feature: change content card in user favorites
  • Loading branch information
olexh authored Jun 30, 2024
2 parents 0ab951a + 59315dd commit f3a8231
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 32 deletions.
14 changes: 2 additions & 12 deletions features/users/user-profile/user-favorites/anime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useParams } from 'next/navigation';
import { FC } from 'react';

import ContentCard from '@/components/content-card/content-card';
import AnimeCard from '@/components/anime-card';
import LoadMoreButton from '@/components/load-more-button';
import NotFound from '@/components/ui/not-found';

Expand Down Expand Up @@ -49,17 +49,7 @@ const Anime: FC<Props> = ({ extended }) => {
)}
>
{filteredData.map((res) => (
<ContentCard
key={res.slug}
watch={
res.watch.length > 0 ? res.watch[0] : undefined
}
title={res.title}
image={res.image}
href={`/anime/${res.slug}`}
slug={res.slug}
content_type="anime"
/>
<AnimeCard key={res.slug} anime={res} />
))}
</div>
)}
Expand Down
13 changes: 3 additions & 10 deletions features/users/user-profile/user-favorites/manga.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import { useParams } from 'next/navigation';
import { FC } from 'react';

import ContentCard from '@/components/content-card/content-card';

import LoadMoreButton from '@/components/load-more-button';
import MangaCard from '@/components/manga-card';
import NotFound from '@/components/ui/not-found';

import useFavorites from '@/services/hooks/favorite/use-favorites';
Expand Down Expand Up @@ -49,15 +50,7 @@ const Manga: FC<Props> = ({ extended }) => {
)}
>
{filteredData.map((res) => (
<ContentCard
key={res.slug}
// read={res.read.length > 0 ? res.read[0] : undefined}
title={res.title}
image={res.image}
href={`/manga/${res.slug}`}
slug={res.slug}
content_type="manga"
/>
<MangaCard key={res.slug} manga={res} />
))}
</div>
)}
Expand Down
12 changes: 2 additions & 10 deletions features/users/user-profile/user-favorites/novel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { useParams } from 'next/navigation';
import { FC } from 'react';

import ContentCard from '@/components/content-card/content-card';
import LoadMoreButton from '@/components/load-more-button';
import NovelCard from '@/components/novel-card';
import NotFound from '@/components/ui/not-found';

import useFavorites from '@/services/hooks/favorite/use-favorites';
Expand Down Expand Up @@ -49,15 +49,7 @@ const Novel: FC<Props> = ({ extended }) => {
)}
>
{filteredData.map((res) => (
<ContentCard
key={res.slug}
read={res.read.length > 0 ? res.read[0] : undefined}
title={res.title}
image={res.image}
href={`/novel/${res.slug}`}
slug={res.slug}
content_type="novel"
/>
<NovelCard key={res.slug} novel={res} />
))}
</div>
)}
Expand Down

0 comments on commit f3a8231

Please sign in to comment.