mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 18:09:09 +00:00
Reach parity with last web iteration. (#162)
* feat: add Api and Session contexts * feat(web): add machinery/new-session * feat(web): add servers page * chore(web): AppRouter spacing/ordering * feat(web): add picker, missing update-roles call for now * feat(web): add picker saves * chore: add roleTransactions tests * feat(web): add auth/login
This commit is contained in:
parent
f65779f925
commit
cd448b56c9
20 changed files with 567 additions and 7 deletions
15
packages/web/src/pages/servers.tsx
Normal file
15
packages/web/src/pages/servers.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Redirect } from '@reach/router';
|
||||
import { ServersTemplate } from '@roleypoly/design-system/templates/servers';
|
||||
import * as React from 'react';
|
||||
import { useSessionContext } from '../session-context/SessionContext';
|
||||
|
||||
const ServersPage = () => {
|
||||
const { isAuthenticated, session } = useSessionContext();
|
||||
if (!isAuthenticated || !session) {
|
||||
return <Redirect to="/" />;
|
||||
}
|
||||
|
||||
return <ServersTemplate guilds={session.guilds || []} user={session.user} />;
|
||||
};
|
||||
|
||||
export default ServersPage;
|
Loading…
Add table
Add a link
Reference in a new issue