added functionality to captcha modal

This commit is contained in:
plebbitor
2023-04-07 17:47:51 +02:00
parent 664533d465
commit 73ed32c848
3 changed files with 89 additions and 33 deletions
+12 -3
View File
@@ -1,9 +1,6 @@
import { create } from 'zustand';
const useAppStore = create((set) => ({
captchaResponse: '',
setCaptchaResponse: (response) => set({ captchaResponse: response }),
bodyStyle: JSON.parse(localStorage.getItem('bodyStyle')) || {
background: '#ffe url(/assets/fade.png) top repeat-x',
color: 'maroon',
@@ -14,11 +11,23 @@ const useAppStore = create((set) => ({
set(() => ({ bodyStyle }));
},
captchaResponse: '',
setCaptchaResponse: (response) => set({ captchaResponse: response }),
challengesArray: [],
setChallengesArray: (challengesArray) => set({ challengesArray }),
defaultSubplebbits: [],
setDefaultSubplebbits: (subplebbits) => set({ defaultSubplebbits: subplebbits }),
isSettingsOpen: false,
setIsSettingsOpen: (isOpen) => set({ isSettingsOpen: isOpen }),
pendingComment: '',
setPendingComment: (comment) => set({ pendingComment: comment }),
publishedComment: '',
setPublishedComment: (comment) => set({ publishedComment: comment }),
selectedAddress: '',
setSelectedAddress: (address) => set({ selectedAddress: address }),