From d42da7bb8c547c6e598e0c15315f0385b94bf420 Mon Sep 17 00:00:00 2001 From: MarconLP <13001502+MarconLP@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:10:45 +0200 Subject: [PATCH] only show VideoUploadModal when user subscription is active or past_due --- src/pages/videos.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/videos.tsx b/src/pages/videos.tsx index a6d7348..9bfd8ed 100644 --- a/src/pages/videos.tsx +++ b/src/pages/videos.tsx @@ -31,7 +31,11 @@ const VideoList: NextPage = () => {
Screenity
- + {["active", "past_due"].includes( + session?.user.stripeSubscriptionStatus ?? "" + ) ? ( + + ) : null} {status === "authenticated" && (
@@ -40,9 +44,9 @@ const VideoList: NextPage = () => {
- {session?.user.stripeSubscriptionStatus === null ? ( - - ) : ( + {["active", "past_due"].includes( + session?.user.stripeSubscriptionStatus ?? "" + ) ? (
{videos && videos.map(({ title, id, createdAt }) => ( @@ -69,6 +73,8 @@ const VideoList: NextPage = () => {
) : null}
+ ) : ( + )}