Refactor useSettings hook, parse with zod schema

This commit is contained in:
Alex Gleason
2024-02-13 23:20:18 -06:00
parent b0a82a23d0
commit ffdb744d16
40 changed files with 108 additions and 92 deletions

View File

@@ -71,7 +71,7 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
const history = useHistory();
const features = useFeatures();
const settings = useSettings();
const { boostModal } = useSettings();
const { account: ownAccount } = useOwnAccount();
const isStaff = ownAccount ? ownAccount.staff : false;
const isAdmin = ownAccount ? ownAccount.admin : false;
@@ -123,7 +123,6 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
const handleReblogClick = () => {
const modalReblog = () => dispatch(toggleReblog(status));
const boostModal = settings.get('boostModal');
if (!boostModal) {
modalReblog();
} else {