snort/packages/app/src/Pages/SettingsPage.tsx

60 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-02-08 21:10:26 +00:00
import { FormattedMessage } from "react-intl";
2023-01-20 17:07:14 +00:00
import { Outlet, RouteObject, useNavigate } from "react-router-dom";
import SettingsIndex from "Pages/settings/Index";
import Profile from "Pages/settings/Profile";
import Relay from "Pages/settings/Relays";
import Preferences from "Pages/settings/Preferences";
2023-01-25 13:10:31 +00:00
import RelayInfo from "Pages/settings/RelayInfo";
2023-04-19 12:10:41 +00:00
import AccountsPage from "Pages/settings/Accounts";
2023-03-02 15:23:53 +00:00
import { WalletSettingsRoutes } from "Pages/settings/WalletSettings";
2023-04-13 11:28:41 +00:00
import { ManageHandleRoutes } from "Pages/settings/handle";
2023-04-21 20:55:04 +00:00
import ExportKeys from "Pages/settings/Keys";
2023-01-09 11:00:23 +00:00
2023-02-08 21:10:26 +00:00
import messages from "./messages";
2023-01-16 17:48:25 +00:00
export default function SettingsPage() {
const navigate = useNavigate();
2023-01-12 12:00:44 +00:00
return (
<div className="main-content">
<h2 onClick={() => navigate("/settings")} className="pointer">
2023-02-08 21:10:26 +00:00
<FormattedMessage {...messages.Settings} />
</h2>
<Outlet />
</div>
);
2023-01-19 11:14:41 +00:00
}
2023-01-20 17:07:14 +00:00
export const SettingsRoutes: RouteObject[] = [
{
path: "",
element: <SettingsIndex />,
},
{
path: "profile",
element: <Profile />,
},
{
path: "relays",
element: <Relay />,
},
{
path: "relays/:id",
element: <RelayInfo />,
},
{
path: "preferences",
element: <Preferences />,
},
2023-04-19 12:10:41 +00:00
{
path: "accounts",
element: <AccountsPage />,
},
2023-04-21 20:55:04 +00:00
{
path: "keys",
element: <ExportKeys />,
},
2023-04-13 11:28:41 +00:00
...ManageHandleRoutes,
2023-03-02 15:23:53 +00:00
...WalletSettingsRoutes,
];