From 0ecd7edb3c2034d0a9fcdb406b02e68d5c64877e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa?= Date: Wed, 2 Oct 2024 11:36:51 +0200 Subject: [PATCH] viewport change --- client/src/app/(auth)/signin/page.tsx | 8 ++++++-- client/src/app/(auth)/signup/page.tsx | 8 ++++++-- .../(dashboard)/dashboard/(profile)/[[...id]]/page.tsx | 8 ++++++-- .../dashboard/collaborators/[[...id]]/page.tsx | 8 ++++++-- .../dashboard/datasets/changes-to-approve/[id]/page.tsx | 8 ++++++-- .../(dashboard)/dashboard/datasets/edit/[id]/page.tsx | 9 ++++++--- .../src/app/(dashboard)/dashboard/datasets/new/page.tsx | 8 ++++++-- .../(dashboard)/dashboard/other-tools/[[...id]]/page.tsx | 8 ++++++-- .../(dashboard)/dashboard/projects/[[...id]]/page.tsx | 8 ++++++-- client/src/app/(password)/reset-password/page.tsx | 8 ++++++-- client/src/app/(password)/update-password/page.tsx | 8 ++++++-- client/src/app/layout.tsx | 8 ++++++-- client/src/components/forms/dataset/colors.tsx | 2 +- 13 files changed, 73 insertions(+), 26 deletions(-) diff --git a/client/src/app/(auth)/signin/page.tsx b/client/src/app/(auth)/signin/page.tsx index 1809848b..956fc984 100644 --- a/client/src/app/(auth)/signin/page.tsx +++ b/client/src/app/(auth)/signin/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import Signin from "@/components/forms/signin"; export const metadata: Metadata = { title: "Sign in | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function SigninPage() { diff --git a/client/src/app/(auth)/signup/page.tsx b/client/src/app/(auth)/signup/page.tsx index 3484de72..796f9d82 100644 --- a/client/src/app/(auth)/signup/page.tsx +++ b/client/src/app/(auth)/signup/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import Signup from "@/components/forms/signup"; export const metadata: Metadata = { title: "Sign up | Caribbean Climate smart map", description: "Caribbean Climate smart map", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function SignupPage() { diff --git a/client/src/app/(dashboard)/dashboard/(profile)/[[...id]]/page.tsx b/client/src/app/(dashboard)/dashboard/(profile)/[[...id]]/page.tsx index 6a681317..981e84e6 100644 --- a/client/src/app/(dashboard)/dashboard/(profile)/[[...id]]/page.tsx +++ b/client/src/app/(dashboard)/dashboard/(profile)/[[...id]]/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import DashboardContent from "@/containers/dashboard"; export const metadata: Metadata = { title: "Dashboard | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function DashboardPage() { diff --git a/client/src/app/(dashboard)/dashboard/collaborators/[[...id]]/page.tsx b/client/src/app/(dashboard)/dashboard/collaborators/[[...id]]/page.tsx index 340ec358..98387d83 100644 --- a/client/src/app/(dashboard)/dashboard/collaborators/[[...id]]/page.tsx +++ b/client/src/app/(dashboard)/dashboard/collaborators/[[...id]]/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import CollaboratorsForm from "@/containers/collaborators/form"; export const metadata: Metadata = { title: "Create new collaborator | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function CollaboratorPage() { diff --git a/client/src/app/(dashboard)/dashboard/datasets/changes-to-approve/[id]/page.tsx b/client/src/app/(dashboard)/dashboard/datasets/changes-to-approve/[id]/page.tsx index 9ba5b3b8..4752f542 100644 --- a/client/src/app/(dashboard)/dashboard/datasets/changes-to-approve/[id]/page.tsx +++ b/client/src/app/(dashboard)/dashboard/datasets/changes-to-approve/[id]/page.tsx @@ -1,4 +1,4 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import Link from "next/link"; @@ -28,7 +28,11 @@ import { export const metadata: Metadata = { title: "Changes to approve | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default async function ChangesToApprovePage({ params }: { params: { id: number } }) { diff --git a/client/src/app/(dashboard)/dashboard/datasets/edit/[id]/page.tsx b/client/src/app/(dashboard)/dashboard/datasets/edit/[id]/page.tsx index 89d23475..8eecd61d 100644 --- a/client/src/app/(dashboard)/dashboard/datasets/edit/[id]/page.tsx +++ b/client/src/app/(dashboard)/dashboard/datasets/edit/[id]/page.tsx @@ -1,5 +1,4 @@ -import { Metadata } from "next"; - +import { Metadata, Viewport } from "next"; import Link from "next/link"; import { Hydrate, dehydrate } from "@tanstack/react-query"; @@ -23,7 +22,11 @@ import { export const metadata: Metadata = { title: "Edit dataset form | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default async function EditDatasetPage({ params }: { params: { id: number } }) { diff --git a/client/src/app/(dashboard)/dashboard/datasets/new/page.tsx b/client/src/app/(dashboard)/dashboard/datasets/new/page.tsx index 7070b588..83389a96 100644 --- a/client/src/app/(dashboard)/dashboard/datasets/new/page.tsx +++ b/client/src/app/(dashboard)/dashboard/datasets/new/page.tsx @@ -1,4 +1,4 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import Link from "next/link"; @@ -16,7 +16,11 @@ import { export const metadata: Metadata = { title: "New dataset form | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function NewDatasetPage() { diff --git a/client/src/app/(dashboard)/dashboard/other-tools/[[...id]]/page.tsx b/client/src/app/(dashboard)/dashboard/other-tools/[[...id]]/page.tsx index 822e1435..c2685ffe 100644 --- a/client/src/app/(dashboard)/dashboard/other-tools/[[...id]]/page.tsx +++ b/client/src/app/(dashboard)/dashboard/other-tools/[[...id]]/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import ToolForm from "@/containers/other-tools/form"; export const metadata: Metadata = { title: "Create / edit a tool | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function OtherToolsFormPage() { diff --git a/client/src/app/(dashboard)/dashboard/projects/[[...id]]/page.tsx b/client/src/app/(dashboard)/dashboard/projects/[[...id]]/page.tsx index 3905b40e..01f335dd 100644 --- a/client/src/app/(dashboard)/dashboard/projects/[[...id]]/page.tsx +++ b/client/src/app/(dashboard)/dashboard/projects/[[...id]]/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import ProjectForm from "@/containers/projects/form"; export const metadata: Metadata = { title: "Create / edit a project | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function NewProjectsPage() { diff --git a/client/src/app/(password)/reset-password/page.tsx b/client/src/app/(password)/reset-password/page.tsx index bdd9391a..54b86128 100644 --- a/client/src/app/(password)/reset-password/page.tsx +++ b/client/src/app/(password)/reset-password/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import ResetPassword from "@/components/forms/reset-password"; export const metadata: Metadata = { title: "Reset Password | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function ResetPasswordPage() { diff --git a/client/src/app/(password)/update-password/page.tsx b/client/src/app/(password)/update-password/page.tsx index 8598ac50..2d1309b5 100644 --- a/client/src/app/(password)/update-password/page.tsx +++ b/client/src/app/(password)/update-password/page.tsx @@ -1,11 +1,15 @@ -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import PasswordUpdate from "@/components/forms/password-update"; export const metadata: Metadata = { title: "Update Password | Caribbean Climate smart map", description: "Generated by create next app", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default function UpdatePasswordPage() { diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx index 37204acc..2dfacff2 100644 --- a/client/src/app/layout.tsx +++ b/client/src/app/layout.tsx @@ -6,7 +6,7 @@ import { PropsWithChildren } from "react"; import { ToastContainer } from "react-toastify"; -import type { Metadata } from "next"; +import type { Metadata, Viewport } from "next"; import { GoogleAnalytics } from "@next/third-parties/google"; import { Hydrate, dehydrate } from "@tanstack/react-query"; @@ -29,7 +29,11 @@ import LayoutProviders from "./layout-providers"; export const metadata: Metadata = { title: { template: "%s | CCSA", default: "CCSA" }, description: "Caribbean Climate smart map", - viewport: "width=1000, initial-scale=1", +}; + +export const viewport: Viewport = { + width: 1000, + initialScale: 1, }; export default async function RootLayout({ children }: PropsWithChildren) { diff --git a/client/src/components/forms/dataset/colors.tsx b/client/src/components/forms/dataset/colors.tsx index 4f58792c..5ae5ebf8 100644 --- a/client/src/components/forms/dataset/colors.tsx +++ b/client/src/components/forms/dataset/colors.tsx @@ -333,7 +333,7 @@ export default function DatasetColorsForm({ ), })} onChange={(e) => { - return field.onChange(e.target.value); + return field.onChange(e?.target?.value); }} disabled={status === "declined" && ME_DATA?.role?.type !== "admin"} />