feat: add rating and screenshots to the release page

This commit is contained in:
Kentai Radiquum 2024-07-31 15:57:56 +05:00
parent 63375d3c32
commit 3f7b7a55a8
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
2 changed files with 138 additions and 35 deletions

View file

@ -86,8 +86,12 @@ export const ReleasePlayer = (props: { id: number }) => {
useEffect(() => {
async function _fetchInfo() {
_fetch(`${ENDPOINTS.statistic.addHistory}/${props.id}/${selectedVoiceover.id}/${selectedSource.id}?token=${token}`);
_fetch(`${ENDPOINTS.statistic.markWatched}/${props.id}/${selectedVoiceover.id}/${selectedSource.id}?token=${token}`);
_fetch(
`${ENDPOINTS.statistic.addHistory}/${props.id}/${selectedVoiceover.id}/${selectedSource.id}?token=${token}`
);
_fetch(
`${ENDPOINTS.statistic.markWatched}/${props.id}/${selectedVoiceover.id}/${selectedSource.id}?token=${token}`
);
}
if (selectedEpisode && !isFirstLoad && token) {
_fetchInfo();
@ -103,7 +107,7 @@ export const ReleasePlayer = (props: { id: number }) => {
return (
<Card>
{!voiceoverInfo || !sourcesInfo || !episodeInfo ? (
<div className="flex items-center justify-center aspect-video">
<div className="flex items-center justify-center w-full h-[757px]">
<Spinner />
</div>
) : (