Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ui/Colorbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,4 @@ const Colorbar = ({units, metadata, valueScales} : {units: string, metadata: Rec
)
}

export default Colorbar
export default React.memo(Colorbar)
4 changes: 2 additions & 2 deletions src/components/ui/ExportExtent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useGlobalStore } from '@/GlobalStates/GlobalStore';
import React from 'react'
import { useShallow } from 'zustand/shallow'

export const ExportExtent = () => {
export const ExportExtent = React.memo(function ExportExtent(){
const {customRes, previewExtent} = useImageExportStore(useShallow(state=> ({
customRes:state.customRes, previewExtent:state.previewExtent
})))
Expand Down Expand Up @@ -81,4 +81,4 @@ export const ExportExtent = () => {

)
}

)
5 changes: 3 additions & 2 deletions src/components/ui/ShaderEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const ConfigureUniforms = ({variables} : {variables:string[]})=>{
)
}

export const ShaderEditor = ({visible} : {visible: boolean}) => {
const ShaderEditor = React.memo(function ShaderEditor ({visible} : {visible: boolean}){
const [shader, setShader] = useState<string | undefined>()
const [showUniforms, setShowUniforms] = useState(false)
const [newDim, setNewDim] = useState(0)
Expand Down Expand Up @@ -268,5 +268,6 @@ export const ShaderEditor = ({visible} : {visible: boolean}) => {
</div>

)
}
})

export {ShaderEditor}
Loading