aboutsummaryrefslogtreecommitdiff
path: root/components/manga/panels/firstPanel.js
diff options
context:
space:
mode:
authorArtrix <[email protected]>2024-01-05 05:12:52 -0800
committerGitHub <[email protected]>2024-01-05 20:12:52 +0700
commit553fe1c71082b040e9f9667ad3e99acdb33990b2 (patch)
tree0c770c406c8ff934ce34d8b10dbae948a554a619 /components/manga/panels/firstPanel.js
parentmigrate to typescript (diff)
downloadmoopa-553fe1c71082b040e9f9667ad3e99acdb33990b2.tar.xz
moopa-553fe1c71082b040e9f9667ad3e99acdb33990b2.zip
feat: Implement a way to review/rate anime (#108)
* Make details cover lead back to anime page * Make 'markProgress' use object instead of param list * Import Link * Implement Rate modal * Pass session into useAniList Co-authored-by: Factiven <[email protected]> * Reimplement using markComplete & add toast for failure * redefined ratemodal * fix: home page client error * update version --------- Co-authored-by: Factiven <[email protected]>
Diffstat (limited to 'components/manga/panels/firstPanel.js')
-rw-r--r--components/manga/panels/firstPanel.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/manga/panels/firstPanel.js b/components/manga/panels/firstPanel.js
index 8470fd0..0ceb2fb 100644
--- a/components/manga/panels/firstPanel.js
+++ b/components/manga/panels/firstPanel.js
@@ -66,13 +66,13 @@ export default function FirstPanel({
if (session) {
if (aniId?.length > 6) return;
const currentChapter = chapter.chapters?.find(
- (x) => x.id === currentId
+ (x) => x.id === currentId,
);
if (currentChapter) {
const chapterNumber =
currentChapter.number ??
chapter.chapters.indexOf(currentChapter) + 1;
- markProgress(aniId, chapterNumber);
+ markProgress({ mediaId: aniId, progress: chapterNumber });
console.log("marking progress");
}
}
@@ -142,14 +142,14 @@ export default function FirstPanel({
>
<Image
src={`https://aoi.moopa.live/utils/image-proxy?url=${encodeURIComponent(
- i.url
+ i.url,
)}${
i?.headers?.Referer
? `&headers=${encodeURIComponent(
- JSON.stringify(i?.headers)
+ JSON.stringify(i?.headers),
)}`
: `&headers=${encodeURIComponent(
- JSON.stringify(getHeaders(chapter.providerId))
+ JSON.stringify(getHeaders(chapter.providerId)),
)}`
}`}
alt={index}
@@ -213,10 +213,10 @@ export default function FirstPanel({
`/en/manga/read/${
chapter.providerId
}?id=${mangadexId}&chapterId=${encodeURIComponent(
- prevChapter?.id
+ prevChapter?.id,
)}${aniId?.length > 6 ? "" : `&anilist=${aniId}`}&num=${
prevChapter?.number
- }`
+ }`,
)
}
>
@@ -234,10 +234,10 @@ export default function FirstPanel({
`/en/manga/read/${
chapter.providerId
}?id=${mangadexId}&chapterId=${encodeURIComponent(
- nextChapter?.id
+ nextChapter?.id,
)}${aniId?.length > 6 ? "" : `&anilist=${aniId}`}&num=${
nextChapter?.number
- }`
+ }`,
)
}
>