Files
animethemes-web/src/components/card/ThemeDetailCard.js
T
Manuel S d801654c56 feat: Added document pages (#108)
* ThemeSummaryCard now includes the theme group (if available).
* ThemeDetailCard no longer includes the theme group in the slug.
* FeaturedTheme now falls back to cover if video fails to load.
* Added new multi cover image component.
* Added more generic input component.
* Added back-end code for MAL and AniList integration.
* Added "Also Used As" section to video page.
* Added "Related Themes" section to video page.
* Re-organized video page.
* Re-implemented sort by filter component.
* Fixed bug where list boxes crashed the site on mobile.
* Fixed bug where switcher links would not work.
* Fixed styled-components SSR in development.
* Started incremental implementation of GraphQL fragments.
* Removed use-media as a dependency.
2022-03-26 03:08:55 +01:00

47 lines
1.8 KiB
JavaScript

import {
StyledRow,
StyledSequence,
StyledThemeCard,
StyledVideoList,
StyledVideoListContainer
} from "./ThemeDetailCard.style";
import { VideoButton } from "components/button";
import { SongTitleWithArtists, ThemeEntryTags } from "components/utils";
import { Text } from "components/text";
import { ThemeMenu } from "components/menu";
export function ThemeDetailCard({ theme }) {
return (
<StyledThemeCard>
<StyledRow>
<StyledSequence>{theme.type}{theme.sequence || null}</StyledSequence>
<SongTitleWithArtists song={theme.song}/>
<ThemeMenu theme={theme}/>
</StyledRow>
{theme.entries.map(entry => (
<StyledRow key={entry.version || 0}>
<StyledSequence secondary>{!!entry.version && `v${entry.version}`}</StyledSequence>
<Text color="text-muted">
<ThemeEntryTags entry={entry}/>
</Text>
<StyledVideoListContainer>
{!!entry.videos && (
<StyledVideoList>
{entry.videos.map((video, index) => (
<VideoButton
key={index}
anime={theme.anime}
theme={theme}
entry={entry}
video={video}
/>
))}
</StyledVideoList>
)}
</StyledVideoListContainer>
</StyledRow>
))}
</StyledThemeCard>
);
}