* wip * Refactor, tasks, processors, routes loading * Move Slack settings config to plugin * Fix translations in plugins * Move Slack auth to plugin * test * Move other slack-related files into plugin * Forgot to save * refactor
24 lines
571 B
TypeScript
24 lines
571 B
TypeScript
import * as React from "react";
|
|
import { Switch } from "react-router-dom";
|
|
import Error404 from "~/scenes/Error404";
|
|
import Route from "~/components/ProfiledRoute";
|
|
import useSettingsConfig from "~/hooks/useSettingsConfig";
|
|
|
|
export default function SettingsRoutes() {
|
|
const configs = useSettingsConfig();
|
|
|
|
return (
|
|
<Switch>
|
|
{configs.map((config) => (
|
|
<Route
|
|
exact
|
|
key={config.path}
|
|
path={config.path}
|
|
component={config.component}
|
|
/>
|
|
))}
|
|
<Route component={Error404} />
|
|
</Switch>
|
|
);
|
|
}
|