feat: wrap App with ToastProvider for global notifications
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
|||||||
import ViolationForm from './components/ViolationForm';
|
import ViolationForm from './components/ViolationForm';
|
||||||
import Dashboard from './components/Dashboard';
|
import Dashboard from './components/Dashboard';
|
||||||
import ReadmeModal from './components/ReadmeModal';
|
import ReadmeModal from './components/ReadmeModal';
|
||||||
|
import ToastProvider from './components/ToastProvider';
|
||||||
|
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{ id: 'dashboard', label: '📊 Dashboard' },
|
{ id: 'dashboard', label: '📊 Dashboard' },
|
||||||
@@ -45,6 +46,7 @@ export default function App() {
|
|||||||
const [showReadme, setShowReadme] = useState(false);
|
const [showReadme, setShowReadme] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<ToastProvider>
|
||||||
<div style={s.app}>
|
<div style={s.app}>
|
||||||
<nav style={s.nav}>
|
<nav style={s.nav}>
|
||||||
<div style={s.logoWrap}>
|
<div style={s.logoWrap}>
|
||||||
@@ -69,5 +71,6 @@ export default function App() {
|
|||||||
|
|
||||||
{showReadme && <ReadmeModal onClose={() => setShowReadme(false)} />}
|
{showReadme && <ReadmeModal onClose={() => setShowReadme(false)} />}
|
||||||
</div>
|
</div>
|
||||||
|
</ToastProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user