feat: settings page
This commit is contained in:
+6
-4
@@ -6,7 +6,7 @@ import DSPPage from './pages/DspPage/DspPage';
|
||||
import AddDSPForm from './pages/AddDspPage/AddDspPage';
|
||||
import { useNotifications } from './hooks/useNotifications';
|
||||
import Notifications from './components/Notifications/Notifications';
|
||||
import CreditsPage from './pages/CreditsPage/CreditsPage';
|
||||
import SettingsPage from './pages/SettingsPage/SettingsPage';
|
||||
import HomePage from './pages/HomePage/HomePage';
|
||||
import { addDSP, createDSPInstance, restoreDSPs } from './dsp/dspApi';
|
||||
import { removeDSP } from './dsp/dspShared';
|
||||
@@ -20,7 +20,7 @@ function App() {
|
||||
const [selected, setSelected] = useState<number | null>(null);
|
||||
const [page, setPage] = useState<AppPage>('home');
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
const { notifications, notify, removeNotification, hoverNotification } = useNotifications();
|
||||
const { notifications, notify, removeNotification, hoverNotification, setNotificationsDisabled } = useNotifications();
|
||||
const connectedDspCount = dsps.filter((dsp) => isConnected(dsp)).length;
|
||||
const restoreStarted = useRef(false);
|
||||
const isMobile = useIsMobile();
|
||||
@@ -96,8 +96,10 @@ function App() {
|
||||
/>
|
||||
|
||||
<main className="stage">
|
||||
{page === 'credits' ? (
|
||||
<CreditsPage />
|
||||
{page === 'settings' ? (
|
||||
<SettingsPage
|
||||
onNotificationsDisabledChange={setNotificationsDisabled}
|
||||
/>
|
||||
) : page === 'add-dsp' ? (
|
||||
<AddDSPForm
|
||||
onCancel={() => setPage('home')}
|
||||
|
||||
Reference in New Issue
Block a user