aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-03-21 23:33:39 +0530
committerreal-zephex <[email protected]>2024-03-21 23:33:39 +0530
commit500ee5433bd6eabf27fc9723a04cfb6a4e66624a (patch)
treefd4b929a6375fa62b816e901b47230759ba4c2f4 /src
parentughh (diff)
downloaddramalama-500ee5433bd6eabf27fc9723a04cfb6a4e66624a.tar.xz
dramalama-500ee5433bd6eabf27fc9723a04cfb6a4e66624a.zip
fix: fixed the backed. let's hope it stays this way
Diffstat (limited to 'src')
-rw-r--r--src/app/anime/page.jsx14
-rw-r--r--src/app/kdrama/api/fetchAnime.js6
-rw-r--r--src/app/kdrama/kdrama.css7
-rw-r--r--src/app/kdrama/page.jsx19
-rw-r--r--src/app/layout.jsx2
-rw-r--r--src/app/recent/page.jsx2
-rw-r--r--src/app/search/components/fetchInfo.js2
-rw-r--r--src/app/top-airing/page.jsx2
-rw-r--r--src/app/video/[animeId]/page.jsx2
9 files changed, 31 insertions, 25 deletions
diff --git a/src/app/anime/page.jsx b/src/app/anime/page.jsx
new file mode 100644
index 0000000..759619d
--- /dev/null
+++ b/src/app/anime/page.jsx
@@ -0,0 +1,14 @@
+import "./anime.css";
+import Trending from "../top-airing/page";
+import Releases from "../recent/page";
+import Input from "../search/page";
+
+export default async function Anime() {
+ return (
+ <div>
+ <Input />
+ <Trending />
+ <Releases />
+ </div>
+ );
+}
diff --git a/src/app/kdrama/api/fetchAnime.js b/src/app/kdrama/api/fetchAnime.js
index 75b6758..eb13c26 100644
--- a/src/app/kdrama/api/fetchAnime.js
+++ b/src/app/kdrama/api/fetchAnime.js
@@ -2,7 +2,7 @@
export async function fetchAnimeInfo(title) {
const res = await fetch(
- "https://dramalama-api.vercel.app/movies/dramacool/" + title
+ "https://consumet-api-di2e.onrender.com/movies/dramacool/" + title
);
const data = await res.json();
return data;
@@ -11,7 +11,7 @@ export async function fetchAnimeInfo(title) {
export async function fetchDramaInfo(id) {
const res = (
await fetch(
- `https://dramalama-api.vercel.app/movies/dramacool/info?id=${id}`
+ `https://consumet-api-di2e.onrender.com/movies/dramacool/info?id=${id}`
)
).json();
return res;
@@ -20,7 +20,7 @@ export async function fetchDramaInfo(id) {
export async function fetchVideoLinks(drama_id, episode_id) {
const res = (
await fetch(
- `https://dramalama-api.vercel.app/movies/dramacool/watch?episodeId=${episode_id}&mediaId=${drama_id}`
+ `https://consumet-api-di2e.onrender.com/movies/dramacool/watch?episodeId=${episode_id}&mediaId=${drama_id}`
)
).json();
return res;
diff --git a/src/app/kdrama/kdrama.css b/src/app/kdrama/kdrama.css
index 9b8617f..7595de7 100644
--- a/src/app/kdrama/kdrama.css
+++ b/src/app/kdrama/kdrama.css
@@ -91,8 +91,8 @@
.popupEntry img {
- width: 120px;
- height: "auto";
+ width: auto;
+ height: auto;
padding: 5px;
border-radius: 10px;
@@ -148,7 +148,8 @@
}
.dramaImage {
- width: 160px;
+ width: auto;
+ height: auto;
border-radius: 10px;
}
diff --git a/src/app/kdrama/page.jsx b/src/app/kdrama/page.jsx
index 1cf9f2b..8f9a936 100644
--- a/src/app/kdrama/page.jsx
+++ b/src/app/kdrama/page.jsx
@@ -31,6 +31,8 @@ export default function Kdrama() {
const [details, setDetails] = useState(null);
async function handleDramaSearch(input) {
+ setVideoLink(null);
+ setEpisodeNo("");
const drama_info = await fetchDramaInfo(input);
setDetails(drama_info);
document.getElementById("intro").style.display = "none";
@@ -48,17 +50,6 @@ export default function Kdrama() {
return (
<main className="main">
- <p
- style={{
- color: "white",
- fontFamily: "Kanit",
- textAlign: "center",
- fontSize: 18,
- }}
- >
- The backend is facing some issues right now. Please try again
- after some time.
- </p>
<div className="sC">
<FaSearch className="searchIcon" />
<input
@@ -107,7 +98,7 @@ export default function Kdrama() {
<Image
className="dramaImage"
src={details.image}
- width={"160"}
+ width={"120"}
height={"240"}
alt="Drama"
/>
@@ -150,8 +141,8 @@ export default function Kdrama() {
<Image
src={item.image}
alt={item.title}
- width={"200"}
- height={"180"}
+ width={"120"}
+ height={"190"}
/>
</div>
))}
diff --git a/src/app/layout.jsx b/src/app/layout.jsx
index a5d6ffa..78f3b59 100644
--- a/src/app/layout.jsx
+++ b/src/app/layout.jsx
@@ -7,7 +7,7 @@ import { Analytics } from "@vercel/analytics/react";
const inter = Inter({ subsets: ["latin"] });
export const metadata = {
- title: "Dramalama V2.0",
+ title: "Dramalama v2.0",
description: "Rewrite of dramalama in next",
};
diff --git a/src/app/recent/page.jsx b/src/app/recent/page.jsx
index 73f4021..7081e46 100644
--- a/src/app/recent/page.jsx
+++ b/src/app/recent/page.jsx
@@ -37,7 +37,7 @@ export default async function Releases() {
async function test() {
const res = await fetch(
- "https://dramalama-api.vercel.app/anime/gogoanime/recent-episodes",
+ "https://consumet-api-di2e.onrender.com/anime/gogoanime/recent-episodes",
{ cache: "force-cache" }
);
const data = res.json();
diff --git a/src/app/search/components/fetchInfo.js b/src/app/search/components/fetchInfo.js
index f843dff..07b203d 100644
--- a/src/app/search/components/fetchInfo.js
+++ b/src/app/search/components/fetchInfo.js
@@ -6,7 +6,7 @@ export default async function Results(id) {
async function testFunction(title) {
const res = await fetch(
- "https://dramalama-api.vercel.app/anime/gogoanime/" + title,
+ "https://consumet-api-di2e.onrender.com/anime/gogoanime/" + title,
{ cache: "force-cache" }
);
const data = await res.json();
diff --git a/src/app/top-airing/page.jsx b/src/app/top-airing/page.jsx
index 8b97183..e68010f 100644
--- a/src/app/top-airing/page.jsx
+++ b/src/app/top-airing/page.jsx
@@ -37,7 +37,7 @@ export default async function Trending() {
async function test() {
const res = await fetch(
- "https://dramalama-api.vercel.app/anime/gogoanime/top-airing",
+ "https://consumet-api-di2e.onrender.com/anime/gogoanime/top-airing",
{ cache: "force-cache" }
);
const data = res.json();
diff --git a/src/app/video/[animeId]/page.jsx b/src/app/video/[animeId]/page.jsx
index 2285657..ed5773a 100644
--- a/src/app/video/[animeId]/page.jsx
+++ b/src/app/video/[animeId]/page.jsx
@@ -48,7 +48,7 @@ export default async function Video({ params }) {
async function getVideoLink(id) {
const res = await fetch(
- "https://dramalama-api.vercel.app/anime/gogoanime/watch/" + id
+ "https://consumet-api-di2e.onrender.com/anime/gogoanime/watch/" + id
);
const data = res.json();
return data;