Skip to content

Commit

Permalink
Merge branch 'olexh:main' into remove-edit-title
Browse files Browse the repository at this point in the history
  • Loading branch information
rosset-nocpes authored May 5, 2024
2 parents 75bd945 + 4b7f273 commit 6b01a0a
Show file tree
Hide file tree
Showing 42 changed files with 269 additions and 242 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

import { range } from '@antfu/utils';

import SkeletonCard from '@/components/skeletons/entry-card';
import SkeletonCard from '@/components/skeletons/content-card';

const AnimeListSkeleton = () => {
return (
Expand Down
6 changes: 3 additions & 3 deletions app/(pages)/(content)/anime/[slug]/components/cover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FC } from 'react';

import { useParams } from 'next/navigation';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import FavoriteButton from '@/components/favorite-button';
import useAnimeInfo from '@/services/hooks/anime/useAnimeInfo';

Expand All @@ -15,7 +15,7 @@ const Cover: FC = () => {

return (
<div className="flex items-center px-16 md:px-48 lg:px-0">
<EntryCard posterProps={{ priority: true }} poster={anime?.poster}>
<ContentCard posterProps={{ priority: true }} poster={anime?.poster}>
<div className="absolute bottom-2 right-2 z-[1]">
<FavoriteButton
slug={String(params.slug)}
Expand All @@ -24,7 +24,7 @@ const Cover: FC = () => {
</div>

<div className="absolute bottom-0 left-0 h-24 w-full bg-gradient-to-t from-black to-transparent" />
</EntryCard>
</ContentCard>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC } from 'react';
import IcBaselineLibraryMusic from '~icons/ic/baseline-library-music';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import Stack from '@/components/ui/stack';
import { OST } from '@/utils/constants';

Expand All @@ -20,7 +20,7 @@ const Ost: FC<Props> = ({ extended, ost }) => {
return (
<Stack size={4} extended={extended}>
{filteredOSTData.map((ost) => (
<EntryCard
<ContentCard
target="_blank"
key={ost.spotify}
href={ost.spotify || undefined}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC } from 'react';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import Stack from '@/components/ui/stack';
import { VIDEO } from '@/utils/constants';

Expand Down Expand Up @@ -39,7 +39,7 @@ const Video: FC<Props> = ({ extended, videos }) => {
const thumb = getYoutubeThumb(video.url);

return (
<EntryCard
<ContentCard
target="_blank"
key={video.url}
href={video.url || '#'}
Expand Down
6 changes: 3 additions & 3 deletions app/(pages)/(content)/characters/[slug]/components/cover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useParams } from 'next/navigation';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import FavoriteButton from '@/components/favorite-button';
import useCharacterInfo from '@/services/hooks/characters/useCharacterInfo';

Expand All @@ -17,15 +17,15 @@ const Cover = () => {

return (
<div className="flex items-center px-16 md:px-48 lg:px-0">
<EntryCard poster={character.image}>
<ContentCard poster={character.image}>
<div className="absolute bottom-2 right-2 z-[1]">
<FavoriteButton
slug={character.slug}
content_type="character"
/>
</div>
<div className="absolute bottom-0 left-0 h-24 w-full bg-gradient-to-t from-black to-transparent" />
</EntryCard>
</ContentCard>
</div>
);
};
Expand Down
10 changes: 5 additions & 5 deletions app/(pages)/(content)/components/anime-card.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { FC } from 'react';

import EntryCard, {
Props as EntryCardProps,
} from '@/components/entry-card/entry-card';
import ContentCard, {
Props as ContentCardProps,
} from '@/components/content-card/content-card';
import { MEDIA_TYPE } from '@/utils/constants';

interface Props extends EntryCardProps {
interface Props extends ContentCardProps {
anime: API.Anime | API.AnimeInfo;
}

const AnimeCard: FC<Props> = ({ anime, ...props }) => {
return (
<EntryCard
<ContentCard
watch={anime.watch ? anime.watch[0] : undefined}
slug={anime.slug}
content_type="anime"
Expand Down
14 changes: 7 additions & 7 deletions app/(pages)/(content)/components/character-anime-card.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import * as React from 'react';
import { FC } from 'react';

import EntryCard, {
Props as EntryCardProps,
} from '@/components/entry-card/entry-card';
import ContentCard, {
Props as ContentCardProps,
} from '@/components/content-card/content-card';

interface Props extends EntryCardProps {
interface Props extends ContentCardProps {
character: API.Character;
anime: API.Anime | API.AnimeInfo;
}

const CharacterAnimeCard: FC<Props> = ({ character, anime, ...props }) => {
return (
<EntryCard
<ContentCard
key={character.slug + anime.slug}
href={`/characters/${character.slug}`}
poster={character.image}
Expand All @@ -26,12 +26,12 @@ const CharacterAnimeCard: FC<Props> = ({ character, anime, ...props }) => {
>
<div className="absolute bottom-0 left-0 z-0 h-16 w-full bg-gradient-to-t from-black to-transparent" />
<div className="absolute bottom-2 right-2 z-[1] flex h-auto w-16 rounded-lg border border-secondary/60 shadow-lg transition-all hover:w-28">
<EntryCard
<ContentCard
href={`/anime/${anime.slug}`}
poster={anime.poster}
/>
</div>
</EntryCard>
</ContentCard>
);
};

Expand Down
10 changes: 5 additions & 5 deletions app/(pages)/(content)/components/character-card.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { FC } from 'react';

import EntryCard, {
Props as EntryCardProps,
} from '@/components/entry-card/entry-card';
import ContentCard, {
Props as ContentCardProps,
} from '@/components/content-card/content-card';

interface Props extends EntryCardProps {
interface Props extends ContentCardProps {
character: API.Character;
}

const CharacterCard: FC<Props> = ({ character, ...props }) => {
return (
<EntryCard
<ContentCard
slug={character.slug}
withContextMenu
content_type="character"
Expand Down
10 changes: 5 additions & 5 deletions app/(pages)/(content)/components/person-card.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FC } from 'react';

import EntryCard, {
Props as EntryCardProps,
} from '@/components/entry-card/entry-card';
import ContentCard, {
Props as ContentCardProps,
} from '@/components/content-card/content-card';

interface Props extends EntryCardProps {
interface Props extends ContentCardProps {
person: API.Person;
roles: {
name_ua: string;
Expand All @@ -23,7 +23,7 @@ const PersonCard: FC<Props> = ({ person, roles, ...props }) => {
};

return (
<EntryCard
<ContentCard
key={person.slug}
href={`/people/${person.slug}`}
description={getRole(roles)}
Expand Down
14 changes: 7 additions & 7 deletions app/(pages)/(content)/components/voice-card.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import * as React from 'react';
import { FC } from 'react';

import EntryCard, {
Props as EntryCardProps,
} from '@/components/entry-card/entry-card';
import ContentCard, {
Props as ContentCardProps,
} from '@/components/content-card/content-card';

interface Props extends EntryCardProps {
interface Props extends ContentCardProps {
person: API.Person;
anime: API.AnimeInfo | API.Anime;
language: string;
}

const VoiceCard: FC<Props> = ({ person, anime, language, ...props }) => {
return (
<EntryCard
<ContentCard
key={person.slug + anime.slug}
href={`/people/${person.slug}`}
poster={person.image}
Expand All @@ -25,12 +25,12 @@ const VoiceCard: FC<Props> = ({ person, anime, language, ...props }) => {
>
<div className="absolute bottom-0 left-0 z-0 h-16 w-full bg-gradient-to-t from-black to-transparent" />
<div className="absolute bottom-2 right-2 z-[1] flex h-auto w-16 rounded-lg border border-secondary/60 shadow-lg transition-all hover:w-28">
<EntryCard
<ContentCard
href={`/anime/${anime.slug}`}
poster={anime.poster}
/>
</div>
</EntryCard>
</ContentCard>
);
};

Expand Down
4 changes: 2 additions & 2 deletions app/(pages)/(content)/people/[slug]/components/cover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useParams } from 'next/navigation';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import usePersonInfo from '@/services/hooks/people/usePersonInfo';

const Cover = () => {
Expand All @@ -16,7 +16,7 @@ const Cover = () => {

return (
<div className="flex items-center px-16 md:px-48 lg:px-0">
<EntryCard poster={person.image} />
<ContentCard poster={person.image} />
</div>
);
};
Expand Down
4 changes: 2 additions & 2 deletions app/(pages)/(root)/components/comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as React from 'react';
import { FC } from 'react';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import Block from '@/components/ui/block';
import Header from '@/components/ui/header';
import HorizontalCard from '@/components/ui/horizontal-card';
Expand Down Expand Up @@ -32,7 +32,7 @@ const Comments: FC<Props> = ({ className }) => {
href={`/u/${item.author.username}`}
createdAt={item.created}
>
<EntryCard
<ContentCard
className="w-10"
poster={item.image}
href={`${CONTENT_TYPE_LINKS[item.content_type]}/${item.slug}`}
Expand Down
2 changes: 1 addition & 1 deletion app/(pages)/(root)/components/ongoings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FC } from 'react';
import { range } from '@antfu/utils';

import AnimeCard from '@/app/(pages)/(content)/components/anime-card';
import SkeletonCard from '@/components/skeletons/entry-card';
import SkeletonCard from '@/components/skeletons/content-card';
import Block from '@/components/ui/block';
import Header from '@/components/ui/header';
import Stack from '@/components/ui/stack';
Expand Down
4 changes: 2 additions & 2 deletions app/(pages)/(root)/components/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Link from 'next/link';

import { useMutation, useQueryClient } from '@tanstack/react-query';

import EntryCard from '@/components/entry-card/entry-card';
import ContentCard from '@/components/content-card/content-card';
import WatchEditModal from '@/components/modals/watch-edit-modal';
import H5 from '@/components/typography/h5';
import P from '@/components/typography/p';
Expand Down Expand Up @@ -118,7 +118,7 @@ const Profile = () => {
{list?.map((item) => (
<Tooltip key={item.anime.slug}>
<TooltipTrigger asChild>
<EntryCard
<ContentCard
onClick={() =>
setSelectedSlug(item.anime.slug)
}
Expand Down
Loading

0 comments on commit 6b01a0a

Please sign in to comment.