mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-07 05:19:40 +05:00
feat(ReleaseOverview): add ability to change view modes for releases pages
This commit is contained in:
parent
10397b2b6a
commit
e079fa3a93
5 changed files with 97 additions and 27 deletions
|
@ -1,15 +1,29 @@
|
|||
import { ReleaseCard } from "@/app/components/ReleaseCard/ReleaseCard";
|
||||
import { ReleaseList } from "@/app/components/ReleaseList/ReleaseList";
|
||||
|
||||
export const CardList = (props) => {
|
||||
return props.data.map((item) => {
|
||||
return (
|
||||
<ReleaseCard
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
title={item.title_ru}
|
||||
poster={item.image}
|
||||
description={item.description}
|
||||
/>
|
||||
);
|
||||
if (props.view == "grid") {
|
||||
return (
|
||||
<ReleaseCard
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
title={item.title_ru}
|
||||
poster={item.image}
|
||||
description={item.description}
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (props.view == "list") {
|
||||
return (
|
||||
<ReleaseList
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
title={item.title_ru}
|
||||
poster={item.image}
|
||||
description={item.description}
|
||||
/>
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue