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

Commit

Permalink
fix: creator token gold intro banner
Browse files Browse the repository at this point in the history
  • Loading branch information
alantoa committed Nov 3, 2023
1 parent 7b8e564 commit a9e0ac7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 9 additions & 5 deletions packages/app/components/home/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useRouter } from "@showtime-xyz/universal.router";
import { Skeleton } from "@showtime-xyz/universal.skeleton";
import { colors } from "@showtime-xyz/universal.tailwind";
import { Text } from "@showtime-xyz/universal.text";
import { View } from "@showtime-xyz/universal.view";
import { View, ViewProps } from "@showtime-xyz/universal.view";

import {
DESKTOP_CONTENT_WIDTH,
Expand All @@ -42,11 +42,11 @@ const heightsNative = [HIDDEN_HEIGHT, VISIBLE_HEIGHT_NATIVE];

export const CreatorTokensBanner = ({
height,
style,
tw,
}: {
height?: number;
tw?: string;
}) => {
} & ViewProps) => {
// const showValue = getIsShowCreatorTokenIntroBanner() ? 1 : 0;
const showValue = 1;
const showBanner = useSharedValue(showValue);
Expand Down Expand Up @@ -129,15 +129,19 @@ export const CreatorTokensBanner = ({
redirectToSelfServeExplainerModal,
user?.user?.data.profile.creator_token_onboarding_status,
]);

if (
user?.user?.data.profile.creator_token_onboarding_status === "onboarded"
) {
return null;
}
return (
<>
<AnimatedView
tw={[
"absolute w-full flex-row items-center overflow-hidden px-4 py-2.5",
tw as any,
]}
style={animatedStyle}
style={[animatedStyle, style]}
>
<BgGoldLinearGradient />
<View>
Expand Down
8 changes: 7 additions & 1 deletion packages/app/components/profile/profile-top.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,13 @@ export const ProfileTop = memo<ProfileTopProps>(function ProfileTop({
return (
<>
{Platform.OS === "web" && (
<CreatorTokensBanner height={52} tw={isSelf ? "pr-14" : ""} />
<CreatorTokensBanner
height={52}
style={{
paddingLeft: isSelf ? 16 : 44,
paddingRight: isSelf ? 44 : 16,
}}
/>
)}
<View tw="web:bg-gray-100 overflow-hidden bg-gray-400 dark:bg-gray-800">
<ProfileCover uri={getFullSizeCover(profileData?.profile)} />
Expand Down

0 comments on commit a9e0ac7

Please sign in to comment.