import { Text } from "preact-i18n";
import Category from "../../components/ui/Category";
import { GenericSettings } from "./GenericSettings";
import { useServer } from "../../context/revoltjs/hooks";
import { Route, useHistory, useParams } from "react-router-dom";
import { List, Share, Users, XSquare } from "@styled-icons/feather";
import RequiresOnline from "../../context/revoltjs/RequiresOnline";
import { Overview } from "./server/Overview";
import { Members } from "./server/Members";
import { Invites } from "./server/Invites";
import { Bans } from "./server/Bans";
export default function ServerSettings() {
const { server: sid } = useParams<{ server: string; }>();
const server = useServer(sid);
if (!server) return null;
const history = useHistory();
function switchPage(to?: string) {
if (to) {
history.replace(`/server/${sid}/settings/${to}`);
} else {
history.replace(`/server/${sid}/settings`);
}
}
return (
,
id: 'overview',
icon:
,
title:
},
{
id: 'members',
icon: ,
title: "Members"
},
{
id: 'invites',
icon: ,
title: "Invites"
},
{
id: 'bans',
icon: ,
title: "Bans"
}
]}
children={[
,
,
,
]}
category="server_pages"
switchPage={switchPage}
defaultPage="overview"
showExitButton
/>
)
}