Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render () {
return (
{
this.state.results.map(result => {
if (result.type === 'board' || result.type === 'creation') {
var buttonText = result.item.name + (result.item.hasAnimations ? ' *' : '')
var fontSize = buttonText.length <= 12 ? 36 : (buttonText.length <= 20 ? 24 : 20) // TODO: ctx.measureText(...)
return (
{
if (result.type === 'board') {
this.getItems(`https://api.remix3d.com/v3/boards/${result.item.id}`, 'boards', this.state.headers)
} else if (result.type === 'creation') {
this.loadCreation(result.item)
function WithSkybox () {
const [skyboxIndex, setIndex] = useState(0)
globalIndex = skyboxIndex
return (
{
Array.from(new Array(50), (_, index) => index).map(number => {
return (
setIndex(globalIndex + 1)}
/>
)
})
}
.add('Default Playground', () => (
<div style="{{">
</div>
)
)
.add('Drag and Drop', () => (