-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from hikka-io/feat/manga
Feat/manga
- Loading branch information
Showing
415 changed files
with
13,434 additions
and
2,853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { FC, ReactNode } from 'react'; | ||
|
||
import Block from '@/components/ui/block'; | ||
|
||
import NavBar from '@/features/anime/anime-list-navbar/anime-list-navbar.component'; | ||
import Filters from '@/features/filters/anime-filters.component'; | ||
|
||
interface Props { | ||
children: ReactNode; | ||
} | ||
|
||
const AnimeListLayout: FC<Props> = async ({ children }) => { | ||
return ( | ||
<div className="grid grid-cols-1 justify-center lg:grid-cols-[1fr_25%] lg:items-start lg:justify-between lg:gap-16"> | ||
<Block> | ||
<NavBar /> | ||
{children} | ||
</Block> | ||
<div className="sticky top-20 order-1 hidden w-full opacity-60 transition-opacity hover:opacity-100 lg:order-2 lg:block"> | ||
<Filters content_type="anime" sort_type="anime" /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AnimeListLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { HydrationBoundary, dehydrate } from '@tanstack/react-query'; | ||
import { redirect } from 'next/navigation'; | ||
import { FC } from 'react'; | ||
|
||
import AnimeList from '@/features/anime/anime-list/anime-list.component'; | ||
|
||
import getQueryClient from '@/utils/get-query-client'; | ||
|
||
interface Props { | ||
searchParams: { [key: string]: string | string[] | undefined }; | ||
} | ||
|
||
const AnimeListPage: FC<Props> = async ({ searchParams }) => { | ||
const page = searchParams.page; | ||
|
||
if (!page) { | ||
return redirect( | ||
`/anime?page=1&iPage=1&${new URLSearchParams(searchParams as Record<string, string>).toString()}`, | ||
); | ||
} | ||
|
||
/* const query = searchParams.search as string; | ||
const media_type = searchParams.types; | ||
const status = searchParams.statuses; | ||
const season = searchParams.seasons; | ||
const rating = searchParams.ratings; | ||
const years = searchParams.years; | ||
const genres = searchParams.genres; | ||
const studios = searchParams.studios; | ||
const only_translated = searchParams.only_translated; | ||
const sort = searchParams.sort || 'score'; | ||
const order = searchParams.order || 'desc'; | ||
const iPage = searchParams.iPage; | ||
const dataKeys = { | ||
query, | ||
media_type: typeof media_type === 'string' ? [media_type] : media_type, | ||
status: typeof status === 'string' ? [status] : status, | ||
season: typeof season === 'string' ? [season] : season, | ||
rating: typeof rating === 'string' ? [rating] : rating, | ||
years: typeof years === 'string' ? [years] : years, | ||
genres: typeof genres === 'string' ? [genres] : genres, | ||
studios: typeof studios === 'string' ? [studios] : studios, | ||
only_translated: Boolean(only_translated), | ||
sort: sort ? [`${sort}:${order}`] : undefined, | ||
page: Number(page), | ||
iPage: Number(iPage), | ||
}; | ||
await prefetchAnimeCatalog(dataKeys); */ | ||
|
||
const queryClient = getQueryClient(); | ||
|
||
const dehydratedState = dehydrate(queryClient); | ||
|
||
return ( | ||
<HydrationBoundary state={dehydratedState}> | ||
<AnimeList /> | ||
</HydrationBoundary> | ||
); | ||
}; | ||
|
||
export default AnimeListPage; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 0 additions & 50 deletions
50
app/(pages)/(content)/anime/[slug]/(animeDetails)/comments/page.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.