fix: hide redeem button with feature flag
This commit is contained in:
@@ -18,6 +18,7 @@ import type { CurrentRewardsClientProps } from "@/types/components/myPages/myPag
|
|||||||
|
|
||||||
export default function ClientCurrentRewards({
|
export default function ClientCurrentRewards({
|
||||||
initialCurrentRewards,
|
initialCurrentRewards,
|
||||||
|
showRedeem,
|
||||||
}: CurrentRewardsClientProps) {
|
}: CurrentRewardsClientProps) {
|
||||||
const lang = useLang()
|
const lang = useLang()
|
||||||
const { data, isFetching, fetchNextPage, hasNextPage, isLoading } =
|
const { data, isFetching, fetchNextPage, hasNextPage, isLoading } =
|
||||||
@@ -73,9 +74,11 @@ export default function ClientCurrentRewards({
|
|||||||
{reward.label}
|
{reward.label}
|
||||||
</Title>
|
</Title>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.btnContainer}>
|
{showRedeem && (
|
||||||
<Redeem reward={reward} />
|
<div className={styles.btnContainer}>
|
||||||
</div>
|
<Redeem reward={reward} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</article>
|
</article>
|
||||||
))}
|
))}
|
||||||
</Grids.Stackable>
|
</Grids.Stackable>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { env } from "@/env/server"
|
||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
@@ -25,7 +26,10 @@ export default async function CurrentRewardsBlock({
|
|||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<SectionHeader title={title} link={link} preamble={subtitle} />
|
<SectionHeader title={title} link={link} preamble={subtitle} />
|
||||||
<ClientCurrentRewards initialCurrentRewards={initialCurrentRewards} />
|
<ClientCurrentRewards
|
||||||
|
initialCurrentRewards={initialCurrentRewards}
|
||||||
|
showRedeem={env.USE_NEW_REWARDS_ENDPOINT}
|
||||||
|
/>
|
||||||
<SectionLink link={link} variant="mobile" />
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export type ContentProps = {
|
|||||||
|
|
||||||
export interface CurrentRewardsClientProps {
|
export interface CurrentRewardsClientProps {
|
||||||
initialCurrentRewards: { rewards: Reward[]; nextCursor: number | undefined }
|
initialCurrentRewards: { rewards: Reward[]; nextCursor: number | undefined }
|
||||||
|
showRedeem: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Redeem {
|
export interface Redeem {
|
||||||
|
|||||||
Reference in New Issue
Block a user