generated from EasyWebApp/WebCell-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.tsx
More file actions
36 lines (29 loc) · 1.05 KB
/
index.tsx
File metadata and controls
36 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { User } from '@open-source-bazaar/activityhub-service';
import { observer } from 'mobx-react';
import { useRouter } from 'next/router';
import { compose, JWTProps, jwtVerifier } from 'next-ssr-middleware';
import { FC, useContext } from 'react';
import { userMenu } from '../../../components/Activity/menu';
import { SessionList } from '../../../components/Session/List';
import { SessionBox } from '../../../components/User/SessionBox';
import { I18nContext } from '../../../models/Translation';
interface SessionListPageProps extends JWTProps<User> {}
export const getServerSideProps = compose<{}, SessionListPageProps>(
jwtVerifier(),
async () => ({ props: {} }),
);
const SessionListPage: FC<SessionListPageProps> = observer(({ jwtPayload }) => {
const { asPath } = useRouter(),
i18n = useContext(I18nContext);
const title = i18n.t('session_list');
return (
<SessionBox
{...{ title, jwtPayload }}
path={asPath}
menu={userMenu(i18n)}
>
<SessionList />
</SessionBox>
);
});
export default SessionListPage;