From 5ac9cf20d2c84852ae5b2f7e2cc465dbfe0fabe1 Mon Sep 17 00:00:00 2001 From: Chisomchima <chimachisom360@gmail.com> Date: Tue, 7 Jan 2025 12:10:18 +0100 Subject: [PATCH] fix: lint errors and proptypes --- i18n/en.pot | 4 ++-- src/layout/VerifyEmailWarning.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 4228c8c5..fd723b7b 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2025-01-07T08:32:23.225Z\n" -"PO-Revision-Date: 2025-01-07T08:32:23.226Z\n" +"POT-Creation-Date: 2025-01-07T11:04:56.155Z\n" +"PO-Revision-Date: 2025-01-07T11:04:56.155Z\n" msgid "Never" msgstr "Never" diff --git a/src/layout/VerifyEmailWarning.js b/src/layout/VerifyEmailWarning.js index b7d8b595..98199bf7 100644 --- a/src/layout/VerifyEmailWarning.js +++ b/src/layout/VerifyEmailWarning.js @@ -5,9 +5,8 @@ import React from 'react' export function VerifyEmailWarning({ config }) { const enforceVerifiedEmail = - config?.system?.settings?.enforceVerifiedEmail || false - const emailVerified = config.system?.settings?.settings?.enforceVerifiedEmail || false + const emailVerified = config.currentUser?.emailVerified || false if (enforceVerifiedEmail && !emailVerified) { return ( @@ -31,7 +30,9 @@ VerifyEmailWarning.propTypes = { }), system: PropTypes.shape({ settings: PropTypes.shape({ - enforceVerifiedEmail: PropTypes.bool, + settings: PropTypes.shape({ + enforceVerifiedEmail: PropTypes.bool, + }), }), }), }).isRequired,