diff options
author | poeti8 <ezzati.upt@gmail.com> | 2020-07-29 17:46:57 +0300 |
---|---|---|
committer | poeti8 <ezzati.upt@gmail.com> | 2020-07-29 17:46:57 +0300 |
commit | 3aab6cb73d341b5604b60c859fe96bb7894b6c48 (patch) | |
tree | e4079911345185572bbb2eb04766b3034ea6d6bd /client | |
parent | 6ba089389d2f67ddc801efc310952404a628e348 (diff) |
feat: only use recaptcha if value exists.
Resolves #357.
Diffstat (limited to 'client')
-rw-r--r-- | client/components/ReCaptcha.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/components/ReCaptcha.tsx b/client/components/ReCaptcha.tsx index 03bef07..c275e8f 100644 --- a/client/components/ReCaptcha.tsx +++ b/client/components/ReCaptcha.tsx @@ -6,9 +6,8 @@ import React from "react"; const { publicRuntimeConfig } = getConfig(); const ReCaptcha = () => { - if (process.env.NODE_ENV !== "production") { - return null; - } + if (process.env.NODE_ENV !== "production") return null; + if (!publicRuntimeConfig.RECAPTCHA_SITE_KEY) return null; return ( <Flex |