Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
Signed-off-by: Kipruto <[email protected]>
  • Loading branch information
kelvinkipruto committed Jul 1, 2024
1 parent fca4657 commit c74093c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 6 additions & 0 deletions apps/roboshield/src/lib/data/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
import { Page } from "@/root/payload-types";

export { getPageServerSideProps } from "./local";

export interface PageProps {
blocks: Page["blocks"];
}
11 changes: 3 additions & 8 deletions apps/roboshield/src/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { getPageServerSideProps } from "@/roboshield/lib/data";
import BlockRenderer from "@/roboshield/components/BlockRenderer";
import { Page } from "@/root/payload-types";

type BlockType = Page["blocks"];

interface PageProps {
blocks: BlockType;
}
import { PageProps } from "@/roboshield/lib/data";
import { GetServerSidePropsContext } from "next";

export default function About({ blocks }: PageProps) {
return (
Expand All @@ -16,7 +11,7 @@ export default function About({ blocks }: PageProps) {
);
}

export async function getServerSideProps(context: any) {
export async function getServerSideProps(context: GetServerSidePropsContext) {
const { props } = await getPageServerSideProps(context);
return {
props: {
Expand Down

0 comments on commit c74093c

Please sign in to comment.