chore(LOY-10): rename folder to CurrentRewards

This commit is contained in:
Chuma McPhoy
2024-12-05 08:53:22 +01:00
parent 13551417ed
commit d897bd81ac
6 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
import { env } from "@/env/server"
import { serverClient } from "@/lib/trpc/server"
import SectionContainer from "@/components/Section/Container"
import SectionHeader from "@/components/Section/Header"
import SectionLink from "@/components/Section/Link"
import ClientCurrentRewards from "./Client"
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
export default async function CurrentRewardsBlock({
title,
subtitle,
link,
}: AccountPageComponentProps) {
const rewardsResponse = await serverClient().contentstack.rewards.current()
if (!rewardsResponse?.rewards.length) {
return null
}
return (
<SectionContainer>
<SectionHeader title={title} link={link} preamble={subtitle} />
<ClientCurrentRewards
rewards={rewardsResponse.rewards}
pageSize={6}
showRedeem={env.USE_NEW_REWARDS_ENDPOINT}
/>
<SectionLink link={link} variant="mobile" />
</SectionContainer>
)
}