Initial commit 2

This commit is contained in:
DrHaid
2025-12-13 14:09:00 +01:00
parent 25d7dd7ad2
commit 5a8dc3b057
13 changed files with 2016 additions and 2 deletions

39
src/app.tsx Normal file
View File

@@ -0,0 +1,39 @@
import * as React from 'react';
import {createRoot} from 'react-dom/client';
import '../src/assets/style.css';
import { findExistingAxe } from '.';
const App: React.FC = () => {
const addAxe = async () => {
var axe = await findExistingAxe()
if (!axe) {
axe = await miro.board.createImage({
url: 'https://www.svgrepo.com/show/395800/axe.svg',
width: 200,
title: 'todo-tree-axe'
});
}
await miro.board.viewport.zoomTo(axe);
};
return (
<div className="grid wrapper">
<div className="cs1 ce12">
<h1>TODO Tree Chopper 🪓</h1>
</div>
<div className="cs1 ce12">
<button className="button button-primary" onClick={addAxe}>
Create Axe
</button>
</div>
</div>
);
};
const container = document.getElementById('root');
if (container) {
const root = createRoot(container);
root.render(<App />);
}