aboutsummaryrefslogtreecommitdiff
path: root/src/app/kdrama/components/cacher.js
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-05-24 22:51:36 +0530
committerreal-zephex <[email protected]>2024-05-24 22:51:36 +0530
commit180c9577f8337991ca71470816333fe8430cd3ca (patch)
tree82caa5a920443bcf0db3746c7ecacd968d4fc148 /src/app/kdrama/components/cacher.js
parentstyle: minor improvements to the anime cards (diff)
downloaddramalama-180c9577f8337991ca71470816333fe8430cd3ca.tar.xz
dramalama-180c9577f8337991ca71470816333fe8430cd3ca.zip
✨ feat(ui): 🎨 migrate from vanilla css to tailwind css, adopted next ui and restructured
Diffstat (limited to 'src/app/kdrama/components/cacher.js')
-rw-r--r--src/app/kdrama/components/cacher.js17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/app/kdrama/components/cacher.js b/src/app/kdrama/components/cacher.js
index 860cdca..fdfa272 100644
--- a/src/app/kdrama/components/cacher.js
+++ b/src/app/kdrama/components/cacher.js
@@ -1,21 +1,6 @@
-// This function pre-fetches all the video links for a drama in the background
"use server";
-export async function PreFetchVideoLinks(data, dramaId) {
- try {
- const fetchPromises = data.map(async (element) => {
- const link = `https://consumet-jade.vercel.app/movies/dramacool/watch?episodeId=${element.id}&mediaId=${dramaId}`;
- await fetch(link, { cache: "force-cache" });
- });
-
- await Promise.all(fetchPromises);
- console.log("Video links pre-fetched successfully!");
- } catch (error) {
- console.error("Error occurred while pre-fetching video links:", error);
- }
-}
-
-export async function PreFetchAnimeInfo(data) {
+export async function PreFetchKdramaInfo(data) {
try {
const fetchPromises = data.results.map(async (element) => {
const link = `https://consumet-jade.vercel.app/movies/dramacool/info?id=${element.id}`;