mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
feat: Update Artifact component
This commit is contained in:
parent
1ab04f19b7
commit
d97c840b1a
@ -33,8 +33,13 @@ export const Artifact = memo(({ messageId }: ArtifactProps) => {
|
||||
const artifacts = useStore(workbenchStore.artifacts);
|
||||
const artifact = artifacts[messageId];
|
||||
|
||||
// Early return if no artifact exists
|
||||
if (!artifact) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const actions = useStore(
|
||||
computed(artifact.runner.actions, (actions) => {
|
||||
computed(artifact?.runner?.actions ?? [], (actions) => {
|
||||
return Object.values(actions);
|
||||
}),
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user