From d9aec5726a6299a91333a4f42638ff93d4c2c209 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 1 Jul 2024 16:55:16 +0300 Subject: [PATCH] Fix failing build --- apps/roboshield/next.config.mjs | 10 ------ apps/roboshield/payload-types.ts | 57 ++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/apps/roboshield/next.config.mjs b/apps/roboshield/next.config.mjs index 1cb3e068d..38c5c24cd 100644 --- a/apps/roboshield/next.config.mjs +++ b/apps/roboshield/next.config.mjs @@ -31,16 +31,6 @@ const nextConfig = { config.experiments = { ...config.experiments, topLevelAwait: true }; // eslint-disable-line no-param-reassign return config; }, - images: { - remotePatterns: [ - { - protocol: 'http', - hostname: 'localhost', - port: '3000', - pathname: '**', - }, - ], - }, }; export default withSentryConfig(nextConfig, { diff --git a/apps/roboshield/payload-types.ts b/apps/roboshield/payload-types.ts index 1322dcbe6..f78ea8dbd 100644 --- a/apps/roboshield/payload-types.ts +++ b/apps/roboshield/payload-types.ts @@ -11,11 +11,11 @@ export interface Config { media: Media; pages: Page; users: User; - 'payload-preferences': PayloadPreference; - 'payload-migrations': PayloadMigration; + "payload-preferences": PayloadPreference; + "payload-migrations": PayloadMigration; }; globals: { - 'settings-site': SettingsSite; + "settings-site": SettingsSite; }; } /** @@ -53,7 +53,7 @@ export interface Page { subtitle: string; id?: string | null; blockName?: string | null; - blockType: 'page-header'; + blockType: "page-header"; } | { toolTipText: string; @@ -73,7 +73,7 @@ export interface Page { fetch: string; id?: string | null; blockName?: string | null; - blockType: 'existing-robots'; + blockType: "existing-robots"; } | { title: string; @@ -96,7 +96,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: 'delays'; + blockType: "delays"; } | { title: string; @@ -119,7 +119,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: 'paths'; + blockType: "paths"; } | { title: string; @@ -138,7 +138,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: 'block-bots'; + blockType: "block-bots"; } | { title: string; @@ -150,7 +150,7 @@ export interface Page { placeholder: string; id?: string | null; blockName?: string | null; - blockType: 'site-maps'; + blockType: "site-maps"; } | { title: string; @@ -162,7 +162,7 @@ export interface Page { placeholder: string; id?: string | null; blockName?: string | null; - blockType: 'finish'; + blockType: "finish"; } )[] | null; @@ -175,7 +175,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: 'robo-form'; + blockType: "robo-form"; } )[] | null; @@ -195,7 +195,7 @@ export interface Page { | null; updatedAt: string; createdAt: string; - _status?: ('draft' | 'published') | null; + _status?: ("draft" | "published") | null; } /** * This interface was referenced by `Config`'s JSON-Schema @@ -205,7 +205,7 @@ export interface User { id: string; firstName: string; lastName: string; - roles: ('admin' | 'editor')[]; + roles: ("admin" | "editor")[]; updatedAt: string; createdAt: string; email: string; @@ -226,7 +226,7 @@ export interface User { export interface PayloadPreference { id: string; user: { - relationTo: 'users'; + relationTo: "users"; value: string | User; }; key?: string | null; @@ -269,9 +269,9 @@ export interface SettingsSite { menus?: | { label: string; - linkType?: ('custom' | 'internal') | null; + linkType?: ("custom" | "internal") | null; doc?: { - relationTo: 'pages'; + relationTo: "pages"; value: string | Page; } | null; url?: string | null; @@ -279,15 +279,17 @@ export interface SettingsSite { id?: string | null; }[] | null; - connect?: ('Facebook' | 'Twitter' | 'Instagram' | 'Linkedin' | 'Github' | 'Slack') | null; + connect?: + | ("Facebook" | "Twitter" | "Instagram" | "Linkedin" | "Github" | "Slack") + | null; }; secondaryNavigation?: { menus?: | { label: string; - linkType?: ('custom' | 'internal') | null; + linkType?: ("custom" | "internal") | null; doc?: { - relationTo: 'pages'; + relationTo: "pages"; value: string | Page; } | null; url?: string | null; @@ -300,7 +302,13 @@ export interface SettingsSite { title: string; links?: | { - platform: 'Facebook' | 'Twitter' | 'Instagram' | 'Linkedin' | 'Github' | 'Slack'; + platform: + | "Facebook" + | "Twitter" + | "Instagram" + | "Linkedin" + | "Github" + | "Slack"; url: string; id?: string | null; }[] @@ -320,9 +328,9 @@ export interface SettingsSite { name: string; logo: string | Media; label: string; - linkType?: ('custom' | 'internal') | null; + linkType?: ("custom" | "internal") | null; doc?: { - relationTo: 'pages'; + relationTo: "pages"; value: string | Page; } | null; url?: string | null; @@ -335,7 +343,6 @@ export interface SettingsSite { createdAt?: string | null; } - -declare module 'payload' { +declare module "payload" { export interface GeneratedTypes extends Config {} -} \ No newline at end of file +}