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:
Kurt Hutten
2021-02-25 20:28:59 +11:00
parent 8493838f0c
commit 63c2a79a5d
15 changed files with 1848 additions and 44 deletions

View File

@@ -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>
)
}