fix: scope useWorkspace to panel and add FLY_TOKEN env fallbacks
This commit is contained in:
1 parent
b8f5b77931
commit
d399919690
3 files changed
+33
-16
No files matched your search
+13
-5
@@ -1,7 +1,8 @@
|
||||
import type {
|
||||
PluginClientContext,
|
||||
PluginSidebarItemProps,
|
||||
PluginWorkspacePanelProps,
|
||||
import {
|
||||
type PluginClientContext,
|
||||
type PluginSidebarItemProps,
|
||||
type PluginWorkspacePanelProps,
|
||||
useWorkspace,
|
||||
} from "@getpaseo/plugin/client";
|
||||
import { SidebarRow } from "@getpaseo/plugin/client/ui";
|
||||
import { FlySpritesSettingsScreen } from "./client/settings-screen";
|
||||
@@ -18,7 +19,14 @@ function WorkersSidebarItem({ currentScreen, openScreen }: PluginSidebarItemProp
|
||||
}
|
||||
|
||||
function WorkspaceWorkersPanel({ workspaceId, ...hostProps }: PluginWorkspacePanelProps) {
|
||||
return <FlySpritesWorkersScreen {...hostProps} workspaceId={workspaceId} />;
|
||||
const workspace = useWorkspace(workspaceId);
|
||||
return (
|
||||
<FlySpritesWorkersScreen
|
||||
{...hostProps}
|
||||
workspaceName={workspace?.name}
|
||||
workspaceDirectory={workspace?.directory}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default function contribute(client: PluginClientContext) {
|
||||
|
||||
Reference in new issue
Block a user