diff --git a/apps/roboshield/package.json b/apps/roboshield/package.json index e180b942d..043bccbb6 100644 --- a/apps/roboshield/package.json +++ b/apps/roboshield/package.json @@ -1,6 +1,6 @@ { "name": "roboshield", - "version": "0.1.4", + "version": "0.1.5", "private": true, "scripts": { "build-server": "tsc --project tsconfig.server.json", diff --git a/apps/roboshield/payload.config.ts b/apps/roboshield/payload.config.ts index e1a46bf46..ed46ab712 100644 --- a/apps/roboshield/payload.config.ts +++ b/apps/roboshield/payload.config.ts @@ -5,7 +5,6 @@ import { webpackBundler } from "@payloadcms/bundler-webpack"; import { CollectionConfig, GlobalConfig } from "payload/types"; import { cloudStorage } from "@payloadcms/plugin-cloud-storage"; import Site from "./src/payload/globals/Site"; -import dotenv from "dotenv"; import Media from "./src/payload/collections/Media"; import Pages from "./src/payload/collections/Pages"; import seo from "@payloadcms/plugin-seo"; @@ -13,9 +12,10 @@ import nestedDocs from "@payloadcms/plugin-nested-docs"; import { s3Adapter } from "@payloadcms/plugin-cloud-storage/s3"; import Users from "./src/payload/collections/Users"; import { defaultLocale, locales } from "./src/payload/utils/locales"; +import { loadEnvConfig } from "@next/env"; -dotenv.config(); -dotenv.config({ path: "./.env.local" }); +const projectDir = process.cwd(); +loadEnvConfig(projectDir); const appURL = process?.env?.PAYLOAD_PUBLIC_APP_URL; diff --git a/apps/roboshield/src/components/Footer/Footer.tsx b/apps/roboshield/src/components/Footer/Footer.tsx index 8a3ab40bf..e3bfc13e3 100644 --- a/apps/roboshield/src/components/Footer/Footer.tsx +++ b/apps/roboshield/src/components/Footer/Footer.tsx @@ -96,9 +96,7 @@ export default function Footer({ sx={{ height: "113px", mt: { xs: "52px", md: 0 } }} > {initiative?.title} diff --git a/apps/roboshield/src/components/TwoToneBackground/TwoToneBackground.tsx b/apps/roboshield/src/components/TwoToneBackground/TwoToneBackground.tsx index a9fab0f11..2cea4c64e 100644 --- a/apps/roboshield/src/components/TwoToneBackground/TwoToneBackground.tsx +++ b/apps/roboshield/src/components/TwoToneBackground/TwoToneBackground.tsx @@ -45,10 +45,10 @@ interface Props { sx: any; } -const TwoToneBackground = React.forwardRef(function TwoToneBackground({ - children, - ...props -}: Props) { +const TwoToneBackground = React.forwardRef(function TwoToneBackground( + { children, ...props }: Props, + _ref, +) { return {children}; }); diff --git a/apps/roboshield/src/lib/payload/index.ts b/apps/roboshield/src/lib/payload/index.ts index 30216832d..94178357f 100644 --- a/apps/roboshield/src/lib/payload/index.ts +++ b/apps/roboshield/src/lib/payload/index.ts @@ -16,7 +16,7 @@ async function findPage(slug: string): Promise> { equals: slug, }, }, - }); + }) as unknown as PaginatedDocs; } async function getCollection( @@ -27,7 +27,7 @@ async function getCollection( limit: 0, ...options, collection, - }); + }) as unknown as Promise>; } async function findGlobal( @@ -37,7 +37,7 @@ async function findGlobal( return payload.findGlobal({ ...options, slug, - }); + }) as unknown as Promise; } async function createCollection( @@ -49,7 +49,7 @@ async function createCollection( collection, data, ...options, - }); + }) as unknown as Promise; } async function deleteCollection( @@ -59,7 +59,7 @@ async function deleteCollection( return payload.delete({ ...options, collection, - }); + }) as unknown as Promise; } async function updateCollection( @@ -74,7 +74,7 @@ async function updateCollection( id, data, }; - return payload.update(args); + return payload.update(args) as unknown as Promise; } const api = { createCollection,