Refactored useConfig.

This commit is contained in:
Mike Cao 2023-08-27 19:56:44 -07:00
parent cc574e6da4
commit 183dab3ddc
11 changed files with 27 additions and 39 deletions

View file

@ -4,7 +4,6 @@ import WebsiteAddForm from 'components/pages/settings/websites/WebsiteAddForm';
import WebsiteList from 'components/pages/settings/websites/WebsitesList';
import { useMessages } from 'components/hooks';
import useUser from 'components/hooks/useUser';
import useConfig from 'components/hooks/useConfig';
import { ROLES } from 'lib/constants';
import { useState } from 'react';
import {
@ -24,8 +23,8 @@ export function WebsitesPage() {
const [tab, setTab] = useState('my-websites');
const [fetch, setFetch] = useState(1);
const { user } = useUser();
const { cloudMode } = useConfig();
const { showToast } = useToasts();
const cloudMode = Boolean(process.env.cloudMode);
const handleSave = async () => {
setFetch(fetch + 1);