refactor: reached same app state using vite
This commit is contained in:
58
src/App.tsx
58
src/App.tsx
@@ -1,31 +1,39 @@
|
||||
import { useState } from "react";
|
||||
import reactLogo from "./assets/react.svg";
|
||||
import "./App.css";
|
||||
import { MusicPlayer } from "./components/MusicPlayer";
|
||||
import { MusicVisualizer } from "./components/MusicVisualizer";
|
||||
import { Nvim } from "./components/Nvim/Nvim";
|
||||
import { Terminal } from "./components/Terminal";
|
||||
import { AppContextProvider } from "./context/AppContext";
|
||||
|
||||
function App() {
|
||||
const [count, setCount] = useState(0);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<a href="https://vitejs.dev" target="_blank"></a>
|
||||
<a href="https://react.dev" target="_blank">
|
||||
<img src={reactLogo} className="logo react" alt="React logo" />
|
||||
</a>
|
||||
</div>
|
||||
<h1>Vite + React</h1>
|
||||
<div className="card">
|
||||
<button onClick={() => setCount(count => count + 1)}>
|
||||
count is {count}
|
||||
</button>
|
||||
<p>
|
||||
Edit <code>src/App.tsx</code> and save to test HMR
|
||||
</p>
|
||||
</div>
|
||||
<p className="read-the-docs">
|
||||
Click on the Vite and React logos to learn more
|
||||
</p>
|
||||
</>
|
||||
<AppContextProvider>
|
||||
<main
|
||||
className={
|
||||
"insets-0 fixed flex h-screen w-screen flex-col gap-3 bg-[url(/wallpaper.jpg)] bg-cover p-3 font-body leading-[26px]"
|
||||
}
|
||||
>
|
||||
<nav className="border border-red-500">toolbar</nav>
|
||||
|
||||
<Terminal className="flex-1">
|
||||
<Nvim />
|
||||
</Terminal>
|
||||
|
||||
<div className="flex gap-3">
|
||||
<Terminal className="flex-1 select-none">
|
||||
<MusicPlayer
|
||||
title="Last Tango in Kyoto"
|
||||
artist="Floating Bits"
|
||||
album="Last Tango in Kyoto"
|
||||
duration={93}
|
||||
/>
|
||||
</Terminal>
|
||||
|
||||
<Terminal className="flex-1">
|
||||
<MusicVisualizer />
|
||||
</Terminal>
|
||||
</div>
|
||||
</main>
|
||||
</AppContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user