diff --git a/apps/roboshield/payload-types.ts b/apps/roboshield/payload-types.ts index 03c3da4e1..f7b1d2b82 100644 --- a/apps/roboshield/payload-types.ts +++ b/apps/roboshield/payload-types.ts @@ -108,7 +108,7 @@ export interface Page { blockType: "statistics"; } | { - toolTipText: string; + showRobotsTxt: string; steps?: | ( | { @@ -125,7 +125,7 @@ export interface Page { fetch: string; id?: string | null; blockName?: string | null; - blockType: "existing-robots"; + blockType: "existing-robots-txt"; } | { title: string; @@ -227,7 +227,7 @@ export interface Page { }; id?: string | null; blockName?: string | null; - blockType: "robo-form"; + blockType: "robots-txt-generator"; } )[] | null; diff --git a/apps/roboshield/src/components/BlockRenderer/BlockRenderer.tsx b/apps/roboshield/src/components/BlockRenderer/BlockRenderer.tsx index 840e14003..0f52ee963 100644 --- a/apps/roboshield/src/components/BlockRenderer/BlockRenderer.tsx +++ b/apps/roboshield/src/components/BlockRenderer/BlockRenderer.tsx @@ -3,7 +3,7 @@ import Content from "@/roboshield/components/Content"; import Statistics from "@/roboshield/components/Statistics"; import { Page } from "@/root/payload-types"; import Hero from "@/roboshield/components/Hero"; -import RoboForm from "@/roboshield/components/RoboForm"; +import RobotsTxtGenerator from "@/roboshield/components/RobotsTxtGenerator"; import { FC } from "react"; interface BlockRendererProps extends Pick {} @@ -13,7 +13,7 @@ const components = { "page-hero": Hero, content: Content, statistics: Statistics, - "robo-form": RoboForm, + "robots-txt-generator": RobotsTxtGenerator, }; export default function BlockRenderer({ blocks }: BlockRendererProps) { diff --git a/apps/roboshield/src/components/CommonBots/CommonBots.tsx b/apps/roboshield/src/components/CommonBots/CommonBots.tsx index fa2720c42..cc01c11fb 100644 --- a/apps/roboshield/src/components/CommonBots/CommonBots.tsx +++ b/apps/roboshield/src/components/CommonBots/CommonBots.tsx @@ -36,8 +36,7 @@ export default function CommonBots({ handleSkipToLast, hint, lastStep, - globalLabels, - toolTipText, + actions, }: StepComponent) { const { state } = useGlobalState(); @@ -88,7 +87,7 @@ export default function CommonBots({ @@ -223,7 +222,7 @@ export default function CommonBots({ isValid={true} lastStep={lastStep} back={false} - labels={globalLabels} + labels={actions} /> ); diff --git a/apps/roboshield/src/components/CommonSettings/CommonSettings.tsx b/apps/roboshield/src/components/CommonSettings/CommonSettings.tsx index e282c3e51..0592d4a70 100644 --- a/apps/roboshield/src/components/CommonSettings/CommonSettings.tsx +++ b/apps/roboshield/src/components/CommonSettings/CommonSettings.tsx @@ -36,11 +36,10 @@ export default function CommonSettings({ handleSkipToLast, hint, lastStep, - globalLabels, + actions, selectPlatform, allowedPaths: allowedPathsLabel, disallowedPaths: disallowedPathsLabel, - toolTipText, }: Props) { const { state } = useGlobalState(); @@ -97,7 +96,7 @@ export default function CommonSettings({ ); diff --git a/apps/roboshield/src/components/Delays/Delays.tsx b/apps/roboshield/src/components/Delays/Delays.tsx index 2bd0d7572..f6d63b169 100644 --- a/apps/roboshield/src/components/Delays/Delays.tsx +++ b/apps/roboshield/src/components/Delays/Delays.tsx @@ -27,11 +27,10 @@ export default function Delays({ handleSkipToLast, hint, lastStep, - globalLabels, + actions, cacheDelay: cachedDelayLabel, crawlDelay: crawlDelayLabel, visitTime: visitTimeLabel, - toolTipText, }: Props) { const { state } = useGlobalState(); @@ -85,7 +84,7 @@ export default function Delays({ ); diff --git a/apps/roboshield/src/components/ExistingRobots/index.ts b/apps/roboshield/src/components/ExistingRobots/index.ts deleted file mode 100644 index a3feb9a3b..000000000 --- a/apps/roboshield/src/components/ExistingRobots/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import ExistingRobots from "./ExistingRobots"; - -export default ExistingRobots; diff --git a/apps/roboshield/src/components/ExistingRobots/ExistingRobots.tsx b/apps/roboshield/src/components/ExistingRobotsTxt/ExistingRobotsTxt.tsx similarity index 97% rename from apps/roboshield/src/components/ExistingRobots/ExistingRobots.tsx rename to apps/roboshield/src/components/ExistingRobotsTxt/ExistingRobotsTxt.tsx index b842fcc6c..696d9223a 100644 --- a/apps/roboshield/src/components/ExistingRobots/ExistingRobots.tsx +++ b/apps/roboshield/src/components/ExistingRobotsTxt/ExistingRobotsTxt.tsx @@ -23,7 +23,7 @@ interface Props extends StepComponent { export default function ExistingRobots({ existingRobotsTxt, fetch: fetchLabel, - globalLabels, + actions, handleNext, handleBack, handleSkipToLast, @@ -32,7 +32,6 @@ export default function ExistingRobots({ placeholder, urlValidationError, defaultFetchExistingRobots, - toolTipText, }: Props) { const { state } = useGlobalState(); const [url, setUrl] = useState(state.url); @@ -102,7 +101,7 @@ export default function ExistingRobots({ @@ -170,7 +169,7 @@ export default function ExistingRobots({ isValid={allowNextStep || !shouldFetch} lastStep={lastStep} back={true} - labels={globalLabels} + labels={actions} /> {}} lastStep={lastStep} - toolTipText={toolTipText} + showRobotsTxt={actions?.showRobotsTxt} /> {