diff --git a/package-lock.json b/package-lock.json index 7c9345c8..8ed13b32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "moopa", - "version": "4.0.0", + "version": "4.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "moopa", - "version": "4.0.0", + "version": "4.0.3", "dependencies": { "@apollo/client": "^3.7.3", "@headlessui/react": "^1.7.15", @@ -23,7 +23,6 @@ "graphql": "^15.8.0", "hls.js": "^1.3.2", "ioredis": "^5.3.2", - "memory-cache": "^0.2.0", "next": "^13.1.6", "next-auth": "^4.22.0", "next-pwa": "^5.6.0", @@ -6210,11 +6209,6 @@ "semver": "bin/semver.js" } }, - "node_modules/memory-cache": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-cache/-/memory-cache-0.2.0.tgz", - "integrity": "sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA==" - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", diff --git a/package.json b/package.json index 529af9f5..8aeaf325 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moopa", - "version": "4.0.2", + "version": "4.0.3", "private": true, "founder": "Factiven", "scripts": { @@ -26,7 +26,6 @@ "graphql": "^15.8.0", "hls.js": "^1.3.2", "ioredis": "^5.3.2", - "memory-cache": "^0.2.0", "next": "^13.1.6", "next-auth": "^4.22.0", "next-pwa": "^5.6.0", diff --git a/pages/api/v2/episode/[id].js b/pages/api/v2/episode/[id].js index e17f76a0..c5d98f52 100644 --- a/pages/api/v2/episode/[id].js +++ b/pages/api/v2/episode/[id].js @@ -77,8 +77,8 @@ async function fetchAnify(id) { export default async function handler(req, res) { const { id, releasing = "false", dub = false } = req.query; - // if releasing is true then cache for 10 minutes, if it false cache for 1 week; - const cacheTime = releasing === "true" ? 60 * 10 : 60 * 60 * 24 * 7; + // if releasing is true then cache for 10 minutes, if it false cache for 1 month; + const cacheTime = releasing === "true" ? 60 * 10 : 60 * 60 * 24 * 30; let cached; diff --git a/pages/en/index.js b/pages/en/index.js index acd37056..0ef8d27e 100644 --- a/pages/en/index.js +++ b/pages/en/index.js @@ -493,7 +493,7 @@ export default function Home({ detail, populars, upComing }) { transition={{ duration: 0.5, staggerChildren: 0.2 }} // Add staggerChildren prop > {/* SECTION 3 */} - {recentAdded.length > 0 && ( + {recentAdded?.length > 0 && (