091d043c85
Broad update across dashboard pages, components, extensions, and lib code. Includes ESLint config additions, onboarding flow redesign, settings page refactor, help page content expansion, dead code removal, and test mock fixes. Adds dev docs and public assets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
954 B
TypeScript
35 lines
954 B
TypeScript
'use client'
|
|
|
|
import type { ExtensionDefinition } from '@/lib/extensions/types'
|
|
import { getWorkspaceComponent } from '@/lib/extensions/workspace-registry'
|
|
import ExtensionWorkspaceShell from './ExtensionWorkspaceShell'
|
|
import EmptyExtensionState from './shared/EmptyExtensionState'
|
|
|
|
export default function ExtensionWorkspaceLoader({
|
|
sector,
|
|
slug,
|
|
definition,
|
|
userId,
|
|
}: {
|
|
sector: string
|
|
slug: string
|
|
definition: ExtensionDefinition
|
|
userId: string
|
|
}) {
|
|
|
|
const WorkspaceComponent = getWorkspaceComponent(sector, slug)
|
|
|
|
return (
|
|
<ExtensionWorkspaceShell definition={definition}>
|
|
{WorkspaceComponent ? (
|
|
<WorkspaceComponent userId={userId} />
|
|
) : (
|
|
<EmptyExtensionState
|
|
title="Bakgrundstjänst"
|
|
description={`${definition.name} körs i bakgrunden och har ingen egen vy. Du kan hantera inställningar under Inställningar.`}
|
|
/>
|
|
)}
|
|
</ExtensionWorkspaceShell>
|
|
)
|
|
}
|