fixed eslint warning and bumped nextjs version

This commit is contained in:
corgifist 2025-07-24 02:59:42 +03:00
parent 2e4fe8be22
commit dd2877c1ea
5 changed files with 53 additions and 50 deletions

80
package-lock.json generated
View File

@ -25,7 +25,7 @@
"dexie": "^4.0.11",
"dexie-react-hooks": "^1.1.7",
"lucide-react": "^0.525.0",
"next": "^15.4.2",
"next": "^15.4.3",
"next-themes": "^0.4.6",
"react": "19.1.0",
"react-dom": "19.1.0",
@ -848,9 +848,9 @@
}
},
"node_modules/@next/env": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.4.2.tgz",
"integrity": "sha512-kd7MvW3pAP7tmk1NaiX4yG15xb2l4gNhteKQxt3f+NGR22qwPymn9RBuv26QKfIKmfo6z2NpgU8W2RT0s0jlvg==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.4.3.tgz",
"integrity": "sha512-lKJ9KJAvaWzqurIsz6NWdQOLj96mdhuDMusLSYHw9HBe2On7BjUwU1WeRvq19x7NrEK3iOgMeSBV5qEhVH1cMw==",
"license": "MIT"
},
"node_modules/@next/eslint-plugin-next": {
@ -864,9 +864,9 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.4.2.tgz",
"integrity": "sha512-ovqjR8NjCBdBf1U+R/Gvn0RazTtXS9n6wqs84iFaCS1NHbw9ksVE4dfmsYcLoyUVd9BWE0bjkphOWrrz8uz/uw==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.4.3.tgz",
"integrity": "sha512-YAhZWKeEYY7LHQJiQ8fe3Y6ymfcDcTn7rDC8PDu/pdeIl1Z2LHD4uyPNuQUGCEQT//MSNv6oZCeQzZfTCKZv+A==",
"cpu": [
"arm64"
],
@ -880,9 +880,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.4.2.tgz",
"integrity": "sha512-I8d4W7tPqbdbHRI4z1iBfaoJIBrEG4fnWKIe+Rj1vIucNZ5cEinfwkBt3RcDF00bFRZRDpvKuDjgMFD3OyRBnw==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.4.3.tgz",
"integrity": "sha512-ZPHRdd51xaxCMpT4viQ6h8TgYM1zPW1JIeksPY9wKlyvBVUQqrWqw8kEh1sa7/x0Ied+U7pYHkAkutrUwxbMcg==",
"cpu": [
"x64"
],
@ -896,9 +896,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.4.2.tgz",
"integrity": "sha512-lvhz02dU3Ec5thzfQ2RCUeOFADjNkS/px1W7MBt7HMhf0/amMfT8Z/aXOwEA+cVWN7HSDRSUc8hHILoHmvajsg==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.4.3.tgz",
"integrity": "sha512-QUdqftCXC5vw5cowucqi9FeOPQ0vdMxoOHLY0J5jPdercwSJFjdi9CkEO4Xkq1eG4t1TB/BG81n6rmTsWoILnw==",
"cpu": [
"arm64"
],
@ -912,9 +912,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.4.2.tgz",
"integrity": "sha512-v+5PPfL8UP+KKHS3Mox7QMoeFdMlaV0zeNMIF7eLC4qTiVSO0RPNnK0nkBZSD5BEkkf//c+vI9s/iHxddCZchA==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.4.3.tgz",
"integrity": "sha512-HTL31NsmoafX+r5g91Yj3+q34nrn1xKmCWVuNA+fUWO4X0pr+n83uGzLyEOn0kUqbMZ40KmWx+4wsbMoUChkiQ==",
"cpu": [
"arm64"
],
@ -928,9 +928,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.4.2.tgz",
"integrity": "sha512-PHLYOC9W2cu6I/JEKo77+LW4uPNvyEQiSkVRUQPsOIsf01PRr8PtPhwtz3XNnC9At8CrzPkzqQ9/kYDg4R4Inw==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.4.3.tgz",
"integrity": "sha512-HRQLWoeFkKXd2YCEEy9GhfwOijRm37x4w5r0MMVHxBKSA6ms3JoPUXvGhfHT6srnGRcEUWNrQ2vzkHir5ZWTSw==",
"cpu": [
"x64"
],
@ -944,9 +944,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.4.2.tgz",
"integrity": "sha512-lpmUF9FfLFns4JbTu+5aJGA8aR9dXaA12eoNe9CJbVkGib0FDiPa4kBGTwy0xDxKNGlv3bLDViyx1U+qafmuJQ==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.4.3.tgz",
"integrity": "sha512-NyXUx6G7AayaRGUsVPenuwhyAoyxjQuQPaK50AXoaAHPwRuif4WmSrXUs8/Y0HJIZh8E/YXRm9H7uuGfiacpuQ==",
"cpu": [
"x64"
],
@ -960,9 +960,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.4.2.tgz",
"integrity": "sha512-aMjogoGnRepas0LQ/PBPsvvUzj+IoXw2IoDSEShEtrsu2toBiaxEWzOQuPZ8nie8+1iF7TA63S7rlp3YWAjNEg==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.4.3.tgz",
"integrity": "sha512-2CUTmpzN/7cL1a7GjdLkDFlfH3nwMwW8a6JiaAUsL9MtKmNNO3fnXqnY0Zk30fii3hVEl4dr7ztrpYt0t2CcGQ==",
"cpu": [
"arm64"
],
@ -976,9 +976,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.4.2.tgz",
"integrity": "sha512-FxwauyexSFu78wEqR/+NB9MnqXVj6SxJKwcVs2CRjeSX/jBagDCgtR2W36PZUYm0WPgY1pQ3C1+nn7zSnwROuw==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.4.3.tgz",
"integrity": "sha512-i54YgUhvrUQxQD84SjAbkfWhYkOdm/DNRAVekCHLWxVg3aUbyC6NFQn9TwgCkX5QAS2pXCJo3kFboSFvrsd7dA==",
"cpu": [
"x64"
],
@ -5500,12 +5500,12 @@
"license": "MIT"
},
"node_modules/next": {
"version": "15.4.2",
"resolved": "https://registry.npmjs.org/next/-/next-15.4.2.tgz",
"integrity": "sha512-oH1rmFso+84NIkocfuxaGKcXIjMUTmnzV2x0m8qsYtB4gD6iflLMESXt5XJ8cFgWMBei4v88rNr/j+peNg72XA==",
"version": "15.4.3",
"resolved": "https://registry.npmjs.org/next/-/next-15.4.3.tgz",
"integrity": "sha512-uW7Qe6poVasNIE1X382nI29oxSdFJzjQzTgJFLD43MxyPfGKKxCMySllhBpvqr48f58Om+tLMivzRwBpXEytvA==",
"license": "MIT",
"dependencies": {
"@next/env": "15.4.2",
"@next/env": "15.4.3",
"@swc/helpers": "0.5.15",
"caniuse-lite": "^1.0.30001579",
"postcss": "8.4.31",
@ -5518,14 +5518,14 @@
"node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
},
"optionalDependencies": {
"@next/swc-darwin-arm64": "15.4.2",
"@next/swc-darwin-x64": "15.4.2",
"@next/swc-linux-arm64-gnu": "15.4.2",
"@next/swc-linux-arm64-musl": "15.4.2",
"@next/swc-linux-x64-gnu": "15.4.2",
"@next/swc-linux-x64-musl": "15.4.2",
"@next/swc-win32-arm64-msvc": "15.4.2",
"@next/swc-win32-x64-msvc": "15.4.2",
"@next/swc-darwin-arm64": "15.4.3",
"@next/swc-darwin-x64": "15.4.3",
"@next/swc-linux-arm64-gnu": "15.4.3",
"@next/swc-linux-arm64-musl": "15.4.3",
"@next/swc-linux-x64-gnu": "15.4.3",
"@next/swc-linux-x64-musl": "15.4.3",
"@next/swc-win32-arm64-msvc": "15.4.3",
"@next/swc-win32-x64-msvc": "15.4.3",
"sharp": "^0.34.3"
},
"peerDependencies": {

View File

@ -26,7 +26,7 @@
"dexie": "^4.0.11",
"dexie-react-hooks": "^1.1.7",
"lucide-react": "^0.525.0",
"next": "^15.4.2",
"next": "^15.4.3",
"next-themes": "^0.4.6",
"react": "19.1.0",
"react-dom": "19.1.0",

View File

@ -1,6 +1,6 @@
"use client";
import { SidebarTrigger } from "@/components/ui/sidebar";
import { FormEvent, ReactNode, useState } from "react";
import { ReactNode, useState } from "react";
import { useLiveQuery } from "dexie-react-hooks";
import { db } from "@/lib/db";
import { Label } from "@/components/ui/label";
@ -32,7 +32,7 @@ const ProjectContainer = ({
project: Project
}): ReactNode => {
return (
<AspectRatio ratio={16 / 9} key={project.uuid}>
<AspectRatio ratio={16 / 9}>
<Card className=" rounded-lg shadow-md p-4 w-full h-full overflow-hidden">
<h3 className="text-lg font-semibold">{project.title}</h3>
{project.description && <p className="text-sm text-gray-600">{project.description}</p>}
@ -134,7 +134,7 @@ export default function Home(): ReactNode {
</div>
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 mt-5">
{projects && projects.map((project) => <ProjectContainer project={project}/>)}
{projects && projects.map((project) => <ProjectContainer key={project.uuid} project={project}/>)}
</div>
{(projects != undefined && projects.length == 0) && (
<div className="w-full h-full flex justify-center items-center">

View File

@ -47,13 +47,18 @@ const PersistenceProvider = ({
const allowPersistenceStorage = async () => {
const persistResult = await persist();
if (!persistResult) {
console.log("Something went really wrong while enabling persistent storage");
if (persistResult === false) {
toast("Failed to Enable Persistent Storage", {
description: persistResult == undefined ? "Persistent storage is not supported in your browser" : "Try again later"
description: "Try again later"
})
return;
}
if (persistResult === undefined) {
toast("Failed to Enable Persistent Storage", {
description: "Persistent storage is not supported by your browser"
});
return;
}
localStorage.setItem('persistence-status', "persisted");
};
@ -69,7 +74,7 @@ const PersistenceProvider = ({
Persistent Storage is Unavailable
</AlertDialogTitle>
<AlertDialogDescription>
The browser may delete your local projects without notifying you in case it needs to free up space for other website's data that was used more recently than ClipFusion.
Browser may delete your local data to free up space for other websites
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>

View File

@ -1,10 +1,8 @@
"use client";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
import { SidebarTrigger } from "@/components/ui/sidebar";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { CheckedState } from "@radix-ui/react-checkbox";
import { InfoIcon } from "lucide-react";
import { ReactNode, useEffect, useState } from "react";
import { usePersistenceContext } from "../persistence-provider";