refactoring
This commit is contained in:
21
src/App.js
21
src/App.js
@@ -21,7 +21,6 @@ import DirtyNavigationDialog from './components/DirtyNavigationDialog';
|
||||
import ConfirmationDialog from './components/ConfirmationDialog';
|
||||
import StoreSyncOverlay from './components/StoreSyncOverlay';
|
||||
import RangePickerModal from './components/RangePickerModal';
|
||||
import PickupConfigEditor from './PickupConfigEditor';
|
||||
|
||||
function App() {
|
||||
const [credentials, setCredentials] = useState({ email: '', password: '' });
|
||||
@@ -695,25 +694,6 @@ function App() {
|
||||
<AdminAccessMessage />
|
||||
);
|
||||
|
||||
const legacyEditorContent = session?.isAdmin ? (
|
||||
<PickupConfigEditor
|
||||
config={config}
|
||||
loading={loading}
|
||||
status={status}
|
||||
error={error}
|
||||
weekdays={weekdays}
|
||||
onToggleActive={handleToggleActive}
|
||||
onToggleProfileCheck={handleToggleProfileCheck}
|
||||
onToggleOnlyNotify={handleToggleOnlyNotify}
|
||||
onWeekdayChange={handleWeekdayChange}
|
||||
onRangePickerRequest={setActiveRangePicker}
|
||||
onResetConfig={() => fetchConfig()}
|
||||
onSaveConfig={saveConfig}
|
||||
/>
|
||||
) : (
|
||||
<AdminAccessMessage />
|
||||
);
|
||||
|
||||
return (
|
||||
<Router>
|
||||
<>
|
||||
@@ -722,7 +702,6 @@ function App() {
|
||||
<NavigationTabs isAdmin={session?.isAdmin} onProtectedNavigate={requestNavigation} />
|
||||
<Routes>
|
||||
<Route path="/" element={dashboardContent} />
|
||||
<Route path="/legacy" element={legacyEditorContent} />
|
||||
<Route path="/admin" element={adminPageContent} />
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
</Routes>
|
||||
|
||||
Reference in New Issue
Block a user