Skip to content

Commit 8b65e98

Browse files
committed
Resolve the Platform's type errors against the shared data layer
1 parent 0f3c413 commit 8b65e98

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎apps/sim/platform/app/(shell)/_components/live-shell/live-shell.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ import { legacyUrl, loginUrl, readOrganizationSurface } from '@/platform/lib/dat
1616
*/
1717
export async function LiveShell({ children }: { children: ReactNode }) {
1818
const surface = await readOrganizationSurface()
19-
if (surface.status === 'unauthenticated') redirect(loginUrl())
20-
if (surface.status === 'denied') return <AccessDenied workspacesHref={legacyUrl('/workspace')} />
21-
if (surface.status === 'unavailable') return <SurfaceUnavailable />
19+
if (surface.status !== 'ok') {
20+
if (surface.status === 'unauthenticated') redirect(loginUrl())
21+
if (surface.status === 'denied')
22+
return <AccessDenied workspacesHref={legacyUrl('/workspace')} />
23+
return <SurfaceUnavailable />
24+
}
2225

2326
const { organization } = surface
2427
if (!hasOrganizationSurface(organization)) redirect(legacyRoutes(organization).workspaceSettings)

‎apps/sim/platform/app/(shell)/_components/notification-tray/notification-tray.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export function NotificationTray({ history, navigate }: NotificationTrayProps) {
153153
onClick={() => {
154154
dismiss(item.id)
155155
if ('onAction' in item) item.onAction?.()
156-
else if (item.href) navigate(item.href)
156+
else if ('href' in item && item.href) navigate(item.href)
157157
}}
158158
>
159159
{item.action}

‎apps/sim/platform/tsconfig.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"compilerOptions": {
44
"paths": {
55
"@/platform/*": ["./*"],
6-
"@/*": ["../*"]
6+
"@/*": ["../*"],
7+
"@sim/db": ["../../../packages/db"],
8+
"@sim/db/*": ["../../../packages/db/*"]
79
}
810
},
911
"include": [

0 commit comments

Comments
 (0)