mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49:11 +00:00
23 lines
717 B
TypeScript
23 lines
717 B
TypeScript
import { Redirect } from '@reach/router';
|
|
import { ServersTemplate } from '@roleypoly/design-system/templates/servers';
|
|
import * as React from 'react';
|
|
import { useAppShellProps } from '../contexts/app-shell/AppShellContext';
|
|
import { useSessionContext } from '../contexts/session/SessionContext';
|
|
import { Title } from '../utils/metaTitle';
|
|
|
|
const ServersPage = () => {
|
|
const { isAuthenticated, session } = useSessionContext();
|
|
const appShellProps = useAppShellProps();
|
|
if (!isAuthenticated || !session) {
|
|
return <Redirect to="/" noThrow />;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<Title title={'Your Servers - Roleypoly'} />
|
|
<ServersTemplate {...appShellProps} />
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default ServersPage;
|