Skip to content

Commit

Permalink
Fix playtest dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
parzival418 committed Nov 3, 2023
1 parent 34527c5 commit 3bcdb73
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions packages/client/editor/src/components/EventHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ const EventHandler = ({ pubSub, tab, spellId }) => {
[$RESET_HIGHLIGHTS(tab.id)]: resetHighlights,
}

console.log('Handler map', handlerMap)

useEffect(() => {
if (!tab && !spell && !client) return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const NewMenuBar = props => {

useEffect(() => {
if (!currentTab || !currentTab.id) return
console.log('Current tab', currentTab)
activeTabRef.current = currentTab
}, [currentTab])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ function loadDefaultLayout(api: DockviewApi, tab, spellId) {
},
})

console.log('LOASING SPELL INTO TAB LAYUOUT', spellId)

panel.group.locked = true
panel.group.header.hidden = true

Expand Down Expand Up @@ -125,7 +123,6 @@ const components = {
return <TextEditor {...props.params} />
},
EditorWindow: (props: IDockviewPanelProps<{ tab: Tab, spellId: string }>) => {
console.log('PARAMS INTO EDITOR WINDOW', props.params)
return <EditorWindow {...props.params} />
},
Console: (props: IDockviewPanelProps<{ tab: Tab, spellId: string }>) => {
Expand Down
8 changes: 6 additions & 2 deletions packages/client/editor/src/windows/PlaytestWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ const Playtest = ({ tab, spellId }) => {
const { enqueueSnackbar } = useSnackbar()
const { data: spellData } = spellApi.useGetSpellByIdQuery(
{
spellName: tab,
spellName: tab.name,
id: spellId,
projectId: config.projectId,
},
{
refetchOnMountOrArgChange: true,
skip: !tab.name.split('--')[0],
skip: !spellId,
}
)

Expand Down Expand Up @@ -219,9 +219,13 @@ const Playtest = ({ tab, spellId }) => {
}, [inspectorData])

useEffect(() => {

console.log('PLAYTEST SPELL DATA', spellData)
if (!spellData || spellData.data.length === 0 || !spellData.data[0].graph)
return



const graph = spellData.data[0].graph
const options = Object.values(graph.nodes)
.filter((node: any) => {
Expand Down
1 change: 1 addition & 0 deletions packages/client/state/src/lib/api/spells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const spellApi = rootApi.injectEndpoints({
getSpellById: builder.query({
providesTags: ['Spell'],
query: ({ spellName, id }) => {
console.log('GET SPELL BY ID', spellName, id)
return {
url: `spells?name=${spellName}&id=${id}`,
params: {},
Expand Down

0 comments on commit 3bcdb73

Please sign in to comment.