Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip #1928

Merged
merged 1 commit into from
May 15, 2024
Merged

skip #1928

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions web/components/templates/welcome/welcomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import GenerateAPIKey from "./steps/generateAPIKey";
import Integrations from "./steps/integrations";
import Features from "./steps/features";
import EventListen from "./steps/eventListen";
import { useSupabaseClient } from "@supabase/auth-helpers-react";
import { useOrg } from "../../layout/organizationContext";

interface WelcomePageV2Props {
currentStep: number;
Expand All @@ -18,6 +20,8 @@ const WelcomePageV2 = (props: WelcomePageV2Props) => {
const [step, setStep] = useState<number>(currentStep);
const [apiKey, setApiKey] = useState<string>("");
const router = useRouter();
const supabaseClient = useSupabaseClient();
const orgContext = useOrg();

const handleStepChange = (step: number) => {
router.replace(`/welcome?step=${step}`);
Expand Down Expand Up @@ -79,6 +83,33 @@ const WelcomePageV2 = (props: WelcomePageV2Props) => {
id="steps"
className="w-full min-w-[22.5rem] max-w-[22.5rem] lg:flex-1 flex flex-col py-8 px-4"
>
<div className="flex items-center justify-between pb-8 text-gray-500">
<button
className="text-xs underline"
onClick={() => {
supabaseClient.auth.signOut().then(() => {
router.push("/");
});
}}
>
Log Out
</button>
<button
className="text-xs underline"
onClick={async () => {
await supabaseClient
.from("organization")
.update({
has_onboarded: true,
})
.eq("id", orgContext?.currentOrg?.id);

router.push("/dashboard");
}}
>
Skip Onboarding
</button>
</div>
<Image
src={"/assets/pricing/bouncing-cube.png"}
alt={""}
Expand Down
Loading