Skip to content

Commit

Permalink
typefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Nov 15, 2024
1 parent ca93574 commit 26cda5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/PreviewContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface PreviewContentProps {
tsxRunTriggerCount: number
errorMessage: string | null
circuitJson: any
circuitJsonKey: string
circuitJsonKey?: string
className?: string
showCodeTab?: boolean
showJsonTab?: boolean
Expand All @@ -47,7 +47,7 @@ export const PreviewContent = ({
triggerRunTsx,
tsxRunTriggerCount,
errorMessage,
circuitJsonKey,
circuitJsonKey = "",
circuitJson,
showCodeTab = false,
showJsonTab = true,
Expand Down
2 changes: 2 additions & 0 deletions src/pages/ai.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const AiPage = () => {
circuitJson,
triggerRunTsx,
tsxRunTriggerCount,
circuitJsonKey,
} = useRunTsx({
code,
type: "board",
Expand Down Expand Up @@ -71,6 +72,7 @@ export const AiPage = () => {
triggerRunTsx={triggerRunTsx}
errorMessage={errorMessage}
circuitJson={circuitJson}
circuitJsonKey={circuitJsonKey}
manualEditsFileContent={manualEditsFileContent}
onManualEditsFileContentChange={(
newManualEditsFileContent: string,
Expand Down
17 changes: 11 additions & 6 deletions src/pages/view-snippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ export const ViewSnippetPage = () => {
const { author, snippetName } = useParams()
const { snippet, error: snippetError, isLoading } = useCurrentSnippet()

const { circuitJson, message, triggerRunTsx, tsxRunTriggerCount } = useRunTsx(
{
code: snippet?.code ?? "",
type: snippet?.snippet_type,
},
)
const {
circuitJson,
message,
triggerRunTsx,
tsxRunTriggerCount,
circuitJsonKey,
} = useRunTsx({
code: snippet?.code ?? "",
type: snippet?.snippet_type,
})

return (
<>
Expand Down Expand Up @@ -51,6 +55,7 @@ export const ViewSnippetPage = () => {
tsxRunTriggerCount={tsxRunTriggerCount}
errorMessage={message}
circuitJson={circuitJson}
circuitJsonKey={circuitJsonKey}
showCodeTab={true}
showJsonTab={false}
showImportAndFormatButtons={false}
Expand Down

0 comments on commit 26cda5f

Please sign in to comment.