From 76dfe72f5fbc0e1b1f1073f551a414d320c328f5 Mon Sep 17 00:00:00 2001 From: louistiti Date: Mon, 15 May 2023 00:00:21 +0800 Subject: [PATCH] feat(web app): kick off Aurora structure --- app/src/js/app.tsx | 8 +++----- app/src/js/aurora/button.tsx | 9 +++++++++ app/src/js/test.tsx | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 app/src/js/aurora/button.tsx diff --git a/app/src/js/app.tsx b/app/src/js/app.tsx index 0bf6b53e..57dabc97 100644 --- a/app/src/js/app.tsx +++ b/app/src/js/app.tsx @@ -1,12 +1,10 @@ -import { useState } from 'react' +import { Button } from './aurora/button' function App() { - const [count, setCount] = useState(0) - return ( <> - -

hello from React. Count: {count}

+

Hello from React

+ ) } diff --git a/app/src/js/aurora/button.tsx b/app/src/js/aurora/button.tsx new file mode 100644 index 00000000..8e428e55 --- /dev/null +++ b/app/src/js/aurora/button.tsx @@ -0,0 +1,9 @@ +import type React from 'react' + +interface Props { + children: React.ReactNode +} + +export function Button({ children }: Props) { + return +} diff --git a/app/src/js/test.tsx b/app/src/js/test.tsx index a3c784c6..4a392384 100644 --- a/app/src/js/test.tsx +++ b/app/src/js/test.tsx @@ -1,7 +1,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' -import App from './app.tsx' +import App from './app' ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(