Skip to content

Commit

Permalink
Merge pull request #784 from CodeForAfrica/fix/roboshield-errors
Browse files Browse the repository at this point in the history
@/RoboShield fix misc issues
  • Loading branch information
m453h authored Jul 17, 2024
2 parents f57570d + ecd189c commit ed6d830
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/roboshield/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "roboshield",
"version": "0.1.4",
"version": "0.1.5",
"private": true,
"scripts": {
"build-server": "tsc --project tsconfig.server.json",
Expand Down
6 changes: 3 additions & 3 deletions apps/roboshield/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ 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";
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;

Expand Down
4 changes: 1 addition & 3 deletions apps/roboshield/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ export default function Footer({
sx={{ height: "113px", mt: { xs: "52px", md: 0 } }}
>
<RichTypography
typographyProps={{
variant: "h5SemiBold",
}}
variant="h5SemiBold"
sx={{ color: "text.secondary", mb: "0" }}
>
{initiative?.title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <TwoToneBackgroundRoot {...props}>{children}</TwoToneBackgroundRoot>;
});

Expand Down
12 changes: 6 additions & 6 deletions apps/roboshield/src/lib/payload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function findPage(slug: string): Promise<PaginatedDocs<Page>> {
equals: slug,
},
},
});
}) as unknown as PaginatedDocs<Page>;
}

async function getCollection(
Expand All @@ -27,7 +27,7 @@ async function getCollection(
limit: 0,
...options,
collection,
});
}) as unknown as Promise<PaginatedDocs<CollectionItemTypes>>;
}

async function findGlobal(
Expand All @@ -37,7 +37,7 @@ async function findGlobal(
return payload.findGlobal({
...options,
slug,
});
}) as unknown as Promise<SettingsSite>;
}

async function createCollection(
Expand All @@ -49,7 +49,7 @@ async function createCollection(
collection,
data,
...options,
});
}) as unknown as Promise<CollectionItemTypes>;
}

async function deleteCollection(
Expand All @@ -59,7 +59,7 @@ async function deleteCollection(
return payload.delete({
...options,
collection,
});
}) as unknown as Promise<CollectionItemTypes>;
}

async function updateCollection(
Expand All @@ -74,7 +74,7 @@ async function updateCollection(
id,
data,
};
return payload.update(args);
return payload.update(args) as unknown as Promise<CollectionItemTypes>;
}
const api = {
createCollection,
Expand Down

0 comments on commit ed6d830

Please sign in to comment.