-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save applications and create enrollments when logged in
- Loading branch information
1 parent
f25e5dd
commit ed0cfb8
Showing
10 changed files
with
322 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/application/success/cta-button.tsx
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/application/success/cta-buttons.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use client"; | ||
|
||
import { Button } from "@dub/ui"; | ||
import { useSession } from "next-auth/react"; | ||
import { useRouter } from "next/navigation"; | ||
|
||
export function CTAButtons() { | ||
const router = useRouter(); | ||
const { data: session, status } = useSession(); | ||
|
||
return ( | ||
<> | ||
<Button | ||
type="button" | ||
text={ | ||
status === "authenticated" | ||
? "Continue to Dub Partners" | ||
: "Create your Dub Partners account" | ||
} | ||
className="border-[var(--brand)] bg-[var(--brand)] hover:bg-[var(--brand)] hover:ring-[var(--brand-ring)]" | ||
onClick={() => | ||
router.push(status === "authenticated" ? "/" : "/register") | ||
} | ||
/> | ||
{status === "unauthenticated" && ( | ||
<Button | ||
type="button" | ||
variant="secondary" | ||
text="Log in to Dub Partners" | ||
onClick={() => router.push("/login")} | ||
/> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.