fix: UI nits in QA verison of onboarding v3 (#25532)
* fix create button * fix subdomain prefix in orgs details view * remove redundant text * fix prefix on link fields * brand mode colours * Fix banner positioning * remove app descrtipion plus add mr to account for button * fix gaps * improve free plan welcome modal
This commit is contained in:
1 parent
fd6c6e6419
commit
f87d4de546
14 files changed
+117
-38
No files matched your search
@@ -18,11 +18,13 @@ export function useCreateTeam() {
|
||||
const createTeamMutation = trpc.viewer.teams.create.useMutation();
|
||||
const inviteMemberMutation = trpc.viewer.teams.inviteMember.useMutation();
|
||||
|
||||
const createTeam = async (store: OnboardingState) => {
|
||||
const createTeam = async (store?: OnboardingState) => {
|
||||
setIsSubmitting(true);
|
||||
|
||||
try {
|
||||
const { teamDetails, teamBrand } = store;
|
||||
// Get the latest state from the store to ensure we have the most up-to-date values
|
||||
const currentStore = store || useOnboardingStore.getState();
|
||||
const { teamDetails, teamBrand } = currentStore;
|
||||
|
||||
// Validate team details - if empty, redirect back to team details step
|
||||
if (!teamDetails.name || !teamDetails.name.trim() || !teamDetails.slug || !teamDetails.slug.trim()) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
@@ -11,6 +12,7 @@ import type { OnboardingState } from "../store/onboarding-store";
|
||||
|
||||
export const useSubmitOnboarding = () => {
|
||||
const router = useRouter();
|
||||
const { update: updateSession } = useSession();
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const flags = useFlagMap();
|
||||
@@ -78,6 +80,8 @@ export const useSubmitOnboarding = () => {
|
||||
// No checkout URL means billing is disabled (self-hosted flow)
|
||||
// Organization has already been created by the backend
|
||||
showToast("Organization created successfully!", "success");
|
||||
// Refresh session to get updated organization data
|
||||
await updateSession();
|
||||
// Set flag to show welcome modal after personal onboarding redirect
|
||||
setShowNewOrgModalFlag();
|
||||
skipToPersonal(resetOnboarding);
|
||||
|
||||
Reference in new issue
Block a user