Add a few type improvements to jscadParams.ts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useRender } from 'src/components/IdeWrapper/useRender'
|
||||
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
|
||||
import { genParams, getParams } from 'src/helpers/cadPackages/jscadParams'
|
||||
import { genParams, getParams } from 'src/helpers/cadPackages/jsCad/jscadParams'
|
||||
|
||||
const Customizer = () => {
|
||||
const [open, setOpen] = React.useState(true)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { makeCodeStoreKey, requestRender } from 'src/helpers/hooks/useIdeState'
|
||||
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
|
||||
import type { RawCustomizerParams } from 'src/helpers/cadPackages/common'
|
||||
|
||||
export const useRender = () => {
|
||||
const { state, thunkDispatch } = useIdeContext()
|
||||
return (parameters) => {
|
||||
return (parameters?: RawCustomizerParams) => {
|
||||
thunkDispatch((dispatch, getState) => {
|
||||
const state = getState()
|
||||
dispatch({ type: 'setLoading' })
|
||||
|
||||
Reference in New Issue
Block a user