Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update header.tsx

Kiran K2ac113651dd5
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/(new)/new/header.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/(new)/new/header.tsx
index fce479bb34..1e547269cf 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/(new)/new/header.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/(new)/new/header.tsx
@@ -6,7 +6,6 @@ import { Button, Wordmark } from "@dub/ui";
import { useAction } from "next-safe-action/hooks";
import Link from "next/link";
import { useRouter } from "next/navigation";
-import { useState } from "react";
import { useFormContext } from "react-hook-form";
import { toast } from "sonner";
@@ -17,7 +16,7 @@ export function Header() {
const { executeAsync, isPending } = useAction(onboardProgramAction, {
onSuccess: () => {
- // router.push(`/${workspaceSlug}`);
+ router.push(`/${workspaceSlug}`);
},
onError: ({ error }) => {
toast.error(error.serverError);
@@ -27,12 +26,8 @@ export function Header() {
const saveAndExit = async () => {
if (!workspaceId) return;
- const data = getValues();
-
- console.log("saveAndExit", data);
-
await executeAsync({
- ...data,
+ ...getValues(),
workspaceId,
step: "save-and-exit",
});