Improved some issues with the payment
This commit is contained in:
@@ -49,7 +49,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
||||
redirect: {
|
||||
destination: "/login",
|
||||
permanent: false,
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ interface Props {
|
||||
envVariables: {[key: string]: string};
|
||||
}
|
||||
export default function Home(props: Props) {
|
||||
const { envVariables} = props;
|
||||
const {envVariables} = props;
|
||||
const [showDiagnostics, setShowDiagnostics] = useState(false);
|
||||
const [showDemographicInput, setShowDemographicInput] = useState(false);
|
||||
const [selectedScreen, setSelectedScreen] = useState<Type>("admin");
|
||||
@@ -112,15 +112,7 @@ export default function Home(props: Props) {
|
||||
</div>
|
||||
</Layout>
|
||||
)}
|
||||
{(user.status === "paymentDue" || checkIfUserExpired()) && (
|
||||
<PaymentDue
|
||||
key={envVariables["NEXT_PUBLIC_PAYPAL_CLIENT_ID"]}
|
||||
hasExpired
|
||||
user={user}
|
||||
reload={router.reload}
|
||||
clientID={envVariables["NEXT_PUBLIC_PAYPAL_CLIENT_ID"] || ""}
|
||||
/>
|
||||
)}
|
||||
{(user.status === "paymentDue" || checkIfUserExpired()) && <PaymentDue hasExpired user={user} reload={router.reload} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user