-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathPostDashboardPage.tsx
45 lines (41 loc) · 1.61 KB
/
PostDashboardPage.tsx
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
37
38
39
40
41
42
43
44
45
import React, { FC } from 'react';
import { useUrlParams } from '../../../../core/routing/useUrlParams';
import PostDashboardView from '../views/PostDashboardView';
import PostDashboardContainer from '../containers/PostDashboardContainer/PostDashboardContainer';
import { PostLayout } from '../views/PostLayoutWithOutlet';
import { PostDialogSection } from '../views/PostDialogSection';
import { DialogFooter } from '../../../../core/ui/dialog/DialogWithGrid';
export interface PostDashboardPageProps {
onClose: () => void;
}
const PostDashboardPage: FC<PostDashboardPageProps> = ({ onClose }) => {
const { spaceNameId = '', challengeNameId, opportunityNameId, postNameId = '', calloutNameId = '' } = useUrlParams();
return (
<PostLayout currentSection={PostDialogSection.Dashboard} onClose={onClose}>
<PostDashboardContainer
spaceNameId={spaceNameId}
postNameId={postNameId}
challengeNameId={challengeNameId}
opportunityNameId={opportunityNameId}
calloutNameId={calloutNameId}
>
{({ post, messages, roomId, ...rest }) => (
<PostDashboardView
mode="messages"
banner={post?.profile.visual?.uri}
displayName={post?.profile.displayName}
description={post?.profile.description}
type={post?.type}
tags={post?.profile.tagset?.tags}
references={post?.profile.references}
messages={messages}
roomId={roomId}
{...rest}
/>
)}
</PostDashboardContainer>
<DialogFooter />
</PostLayout>
);
};
export default PostDashboardPage;