mirror of
https://github.com/LiuYuYang01/ThriveX-Blog.git
synced 2026-05-06 22:03:08 +08:00
fix(HCaptcha): 修复未定义config.other时访问hcaptcha_key的错误
This commit is contained in:
5
.env
5
.env
@@ -3,7 +3,4 @@
|
||||
NEXT_PUBLIC_CACHING_TIME=1
|
||||
|
||||
# 项目后端API
|
||||
NEXT_PUBLIC_PROJECT_API=http://localhost:9003/api
|
||||
|
||||
# hCaptcha 站点密钥
|
||||
NEXT_PUBLIC_HCAPTCHA_SITEKEY=
|
||||
NEXT_PUBLIC_PROJECT_API=http://localhost:9003/api
|
||||
@@ -4,7 +4,7 @@ import { useConfigStore } from '@/stores';
|
||||
|
||||
export default forwardRef(({ setToken }: { setToken: (token: string) => void }, ref: Ref<HCaptcha>) => {
|
||||
const config = useConfigStore();
|
||||
const sitekey = config.other.hcaptcha_key;
|
||||
const sitekey = config?.other?.hcaptcha_key;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user