Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix: redirect to profile screen after onboarded (#2477)
Browse files Browse the repository at this point in the history
* fix: redirect to profile screen after onboarded

* fix import
  • Loading branch information
alantoa authored Oct 31, 2023
1 parent ab1f00b commit ee3f0d9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/app/components/profile/complete-profile-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@ import { Platform } from "react-native";
import { Button, GradientButton } from "@showtime-xyz/universal.button";
import { useRouter } from "@showtime-xyz/universal.router";

import { useRedirectToCreateDrop } from "app/hooks/use-redirect-to-create-drop";
import { useOnboardingPromise } from "app/components/onboarding";
import { useUser } from "app/hooks/use-user";

export const CompleteProfileButton = ({ isSelf }: { isSelf: boolean }) => {
const router = useRouter();
const { isIncompletedProfile } = useUser();
const redirectToCreateDrop = useRedirectToCreateDrop();
const { onboardingPromise } = useOnboardingPromise();

if (!isSelf) return null;
if (isIncompletedProfile) {
return (
<GradientButton
size="small"
onPress={redirectToCreateDrop}
onPress={async () => {
await onboardingPromise();
}}
labelTW={"color-white"}
style={{ height: 28, paddingVertical: 0 }}
gradientProps={{
Expand Down

0 comments on commit ee3f0d9

Please sign in to comment.