do not show paywall while loading

This commit is contained in:
MarconLP 2023-04-19 20:56:43 +02:00
parent 34fe998456
commit b0f6da3040
No known key found for this signature in database
GPG key ID: A08A9C8B623F5EA5

View file

@ -44,9 +44,13 @@ const VideoList: NextPage = () => {
</div>
</div>
<div className="flex w-full grow items-start justify-center overflow-auto bg-[#fbfbfb] pt-14">
{["active", "past_due"].includes(
{!isLoading &&
status !== "loading" &&
!["active", "past_due"].includes(
session?.user.stripeSubscriptionStatus ?? ""
) ? (
<Checkout />
) : (
<div className="flex-start grid w-full max-w-[1300px] grid-cols-[repeat(auto-fill,250px)] flex-row flex-wrap items-center justify-center gap-14 px-4 pb-16">
{videos &&
videos.map(({ title, id, createdAt }) => (
@ -73,8 +77,6 @@ const VideoList: NextPage = () => {
</div>
) : null}
</div>
) : (
<Checkout />
)}
</div>
</main>