Create and deploy simple openscad api
A minimal frontend integration has been added to as a POC resolves #219 and #222
This commit is contained in:
@@ -3,6 +3,10 @@ import { IdeContext } from 'src/components/IdeToolbarNew'
|
||||
|
||||
const IdeViewer = () => {
|
||||
const { state } = useContext(IdeContext)
|
||||
const image =
|
||||
state.objectData?.type === 'png' &&
|
||||
state.objectData?.data &&
|
||||
window.URL.createObjectURL(state.objectData?.data)
|
||||
return (
|
||||
<div className="p-8 border-2 m-2">
|
||||
<div className="pb-4">hi I'm viewer</div>
|
||||
@@ -10,8 +14,12 @@ const IdeViewer = () => {
|
||||
I should be showing an{' '}
|
||||
<span className="font-mono uppercase">{state.objectData?.type}</span>{' '}
|
||||
right now with the data{' '}
|
||||
<span className="font-mono uppercase">{state.objectData?.data}</span>{' '}
|
||||
</div>
|
||||
{image && (
|
||||
<div>
|
||||
<img src={image} className="" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user