Skip to content

Commit d03c1b4

Browse files
feat: ts fix and display new properties in the Sandbox
1 parent 84eebd3 commit d03c1b4

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

packages/demo/src/components/ContextRequester.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,22 @@ export const ContextRequester: PluginComponent = (props) => {
55
const { data, actions } = props
66
return (
77
<Stack gap={2}>
8-
<Typography variant="subtitle1">Story</Typography>
9-
<Typography textAlign="center">{JSON.stringify(data.story)}</Typography>
8+
<Typography variant="subtitle1">Story: </Typography>
9+
<Typography textAlign="center">
10+
{JSON.stringify(data.story, null, 2)}
11+
</Typography>
12+
<Typography variant="subtitle1">Permissions: </Typography>
13+
<Typography textAlign="center">
14+
{JSON.stringify(data.userPermissions, null, 2)}
15+
</Typography>
16+
<Typography variant="subtitle1">Is admin: </Typography>
17+
<Typography textAlign="center">
18+
{data.isSpaceAdmin ? 'Yes' : 'No'}
19+
</Typography>
20+
<Typography variant="subtitle1">Is AI enabled: </Typography>
21+
<Typography textAlign="center">
22+
{data.isAIEnabled ? 'Yes' : 'No'}
23+
</Typography>
1024
<Button
1125
variant="outlined"
1226
color="secondary"

packages/field-plugin/src/messaging/pluginMessage/containerToPluginMessage/LoadedMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type LoadedMessage = MessageToPlugin<'loaded'> & {
1414
interfaceLanguage: string
1515
spaceId: number | null
1616
userId: number | undefined
17-
userPermissions: Record<string, any> | undefined
17+
userPermissions: Record<string, string[] | number[]> | undefined
1818
isSpaceAdmin: boolean
1919
story: StoryData
2020
storyId: number | undefined

0 commit comments

Comments
 (0)