Skip to content

Commit

Permalink
fix: remove test button on onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkaske committed Jul 12, 2024
1 parent 0868536 commit f84a315
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/web/src/app/app/[workspaceSlug]/onboarding/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export default async function Onboarding({
<MonitorForm
notifications={allNotifications}
defaultSection="request"
// FIXME: we are getting an https://react.dev/errors/482 error here!
withTestButton={false}
/>
</div>
<div className="hidden h-full md:col-span-1 md:block">
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/components/forms/monitor/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ interface Props {
tags?: MonitorTag[];
pages?: Page[];
nextUrl?: string;
withTestButton?: boolean;
}

const ABORT_TIMEOUT = 7_000; // in ms
Expand All @@ -59,6 +60,7 @@ export function MonitorForm({
pages,
tags,
nextUrl,
withTestButton = true,
}: Props) {
const _assertions = defaultValues?.assertions
? assertions.deserialize(defaultValues?.assertions).map((a) => a.schema)
Expand Down Expand Up @@ -310,7 +312,9 @@ export function MonitorForm({
) : null}
</Tabs>
<div className="grid gap-4 sm:flex sm:items-start sm:justify-end">
<RequestTestButton {...{ form, pingEndpoint }} />
{withTestButton ? (
<RequestTestButton {...{ form, pingEndpoint }} />
) : null}
<SaveButton
isPending={isPending}
isDirty={form.formState.isDirty}
Expand Down

0 comments on commit f84a315

Please sign in to comment.