generated from EasyWebApp/WebCell-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathagenda.tsx
More file actions
29 lines (22 loc) · 1010 Bytes
/
agenda.tsx
File metadata and controls
29 lines (22 loc) · 1010 Bytes
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
import { User } from '@open-source-bazaar/activityhub-service';
import { observer } from 'mobx-react';
import { useRouter } from 'next/router';
import { JWTProps, jwtVerifier } from 'next-ssr-middleware';
import { FC, useContext } from 'react';
import { AgendaList } from '../../components/Activity/AgendaList';
import { userMenu } from '../../components/Activity/menu';
import { SessionBox } from '../../components/User/SessionBox';
import { I18nContext } from '../../models/Translation';
interface UserAgendaPageProps extends JWTProps<User> {}
export const getServerSideProps = jwtVerifier<UserAgendaPageProps>();
const UserAgendaPage: FC<UserAgendaPageProps> = observer(({ jwtPayload }) => {
const { asPath } = useRouter(),
i18n = useContext(I18nContext);
const title = i18n.t('agenda_management');
return (
<SessionBox {...{ title, jwtPayload }} path={asPath} menu={userMenu(i18n)}>
<AgendaList userId={jwtPayload?.id} />
</SessionBox>
);
});
export default UserAgendaPage;