aboutsummaryrefslogtreecommitdiff
path: root/src/app/manga/history/continueWatching
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-05-29 10:01:52 +0530
committerreal-zephex <[email protected]>2024-05-29 10:01:52 +0530
commit06b2adcd10811b92b079294dbdab65727ff2015b (patch)
tree03205287b4f8fa77b251c6b94bac515db04ef314 /src/app/manga/history/continueWatching
parent✨ feat(series): rewrite series page and drop manga support (diff)
downloaddramalama-06b2adcd10811b92b079294dbdab65727ff2015b.tar.xz
dramalama-06b2adcd10811b92b079294dbdab65727ff2015b.zip
⚡️ perf(deps): upgrade to react 19 and next js 15, add loading screen, drop mangas support
Diffstat (limited to 'src/app/manga/history/continueWatching')
-rw-r--r--src/app/manga/history/continueWatching/cw.module.css75
-rw-r--r--src/app/manga/history/continueWatching/page.jsx70
2 files changed, 0 insertions, 145 deletions
diff --git a/src/app/manga/history/continueWatching/cw.module.css b/src/app/manga/history/continueWatching/cw.module.css
deleted file mode 100644
index e83be6b..0000000
--- a/src/app/manga/history/continueWatching/cw.module.css
+++ /dev/null
@@ -1,75 +0,0 @@
-.main {
- width: 99%;
- margin: 80px auto;
-}
-
-.mainText {
- color: var(--light-green);
- font-size: 24px;
-}
-
-.animeContainer {
- font-size: 18px;
- margin: 0px;
-}
-
-.animeEntry {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 5px;
- margin-bottom: 0.5rem;
- border-radius: 1rem;
- background-color: #1f1f1f;
-}
-
-.animeEntry img {
- width: 10%;
- height: auto;
- border-radius: 0.8rem;
-}
-
-.titleContainer {
- color: white;
- margin-left: 0.2rem;
-}
-
-.titleContainer h3 {
- margin: 0px;
-}
-
-.EpisodeCount {
- color: var(--soft-purple);
- margin: 0px;
-}
-
-.date {
- color: var(--neon-yellow);
- margin: 0px;
-}
-
-.redirects {
- margin: 5px 0 0 0;
-}
-
-.redirects button {
- outline: none;
- border: none;
- margin-right: 0.4rem;
- border-radius: 0.2rem;
- padding: 0.2rem;
- font-family: "Lexend Deca", serif;
- background-color: #303030;
- color: white;
- cursor: pointer;
-}
-
-@media screen and (max-width: 768px) {
- .animeContainer {
- font-size: 14px;
- }
-
- .animeEntry img {
- width: 35%;
- }
-}
diff --git a/src/app/manga/history/continueWatching/page.jsx b/src/app/manga/history/continueWatching/page.jsx
deleted file mode 100644
index 8c5f651..0000000
--- a/src/app/manga/history/continueWatching/page.jsx
+++ /dev/null
@@ -1,70 +0,0 @@
-"use client";
-
-import React, { useState, useEffect } from "react";
-import Image from "next/image";
-import styles from "./cw.module.css";
-import Link from "next/link";
-
-const ContinueWatching = () => {
- const [localItems, setLocalItems] = useState(null);
-
- useEffect(() => {
- const newData = get_local();
- setLocalItems(newData);
- }, []); // Empty dependency array means this effect runs only once after the initial render
-
- function get_local() {
- try {
- const data = localStorage.getItem("mangaData");
- return JSON.parse(data);
- } catch (error) {
- console.log("error", error);
- return false;
- }
- }
-
- return (
- <main className={styles.main}>
- <p className={styles.mainText}>Continue Reading</p>
- {localItems && (
- <div className={styles.animeContainer}>
- {localItems.watchHis &&
- localItems.watchHis.map((item, index) => (
- <div key={index} className={styles.animeEntry}>
- <div className={styles.titleContainer}>
- <h3>{item.title}</h3>
- <p className={styles.EpisodeCount}>
- Currently reading: Volume {item.volume}{" "}
- Chapter {item.chapter}
- </p>
- <div className={styles.redirects}>
- <Link
- href={`/manga/info/${item.mangaId}`}
- >
- <button>Info Page</button>
- </Link>
- <Link
- href={`/manga/info/read/${item.id}`}
- >
- <button>
- Read current chapter
- </button>
- </Link>
- </div>
- </div>
- <Image
- src={item.image}
- width={140}
- height={210}
- alt="Continue anime poster"
- priority
- />
- </div>
- ))}
- </div>
- )}
- </main>
- );
-};
-
-export default ContinueWatching;