From 320aedefb173da3a7432d36ebbd736d152a5c612 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 12 Oct 2023 20:51:09 +0100 Subject: [PATCH] Improved the screen for when a user's subscription has expired, or their account was disabled --- src/pages/index.tsx | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index a706f6d5..7477ab2c 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,6 +19,7 @@ import {calculateAverageLevel} from "@/utils/score"; import axios from "axios"; import DemographicInformationInput from "@/components/DemographicInformationInput"; import moment from "moment"; +import Link from "next/link"; export const getServerSideProps = withIronSessionSsr(({req, res}) => { const user = req.session.user; @@ -74,7 +75,32 @@ export default function Home() { -
+
+ {user.isDisabled ? ( + <> + Your account has been disabled! + Please contact an administrator if you believe this to be a mistake. + + ) : ( + <> + Your subscription has expired! +
+ + Please purchase a new time pack{" "} + + here + + . + + + If you are not the one in charge of your subscription, please contact the one responsible to extend it. + +
+ + )} +
);