Skip to content

Commit

Permalink
feat: provisional GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Migaloco authored Feb 6, 2024
1 parent fde11ba commit e0b0a56
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
46 changes: 7 additions & 39 deletions edgen/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,19 @@
import { useState } from "react";
import reactLogo from "./assets/react.svg";
import { invoke } from "@tauri-apps/api/tauri";

import "./App.css";

function App() {
const [greetMsg, setGreetMsg] = useState("");
const [name, setName] = useState("");
import edgenLogo from "./assets/edgen_logo.svg"

async function greet() {
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
setGreetMsg(await invoke("greet", { name }));
}
function App() {

return (
<div className="container">
<h1>Welcome to Tauri!</h1>
<h1>Welcome to Edgen!</h1>

<div className="row">
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" className="logo vite" alt="Vite logo" />
</a>
<a href="https://tauri.app" target="_blank">
<img src="/tauri.svg" className="logo tauri" alt="Tauri logo" />
</a>
<a href="https://reactjs.org" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
<div>
<img src={edgenLogo} className="logo edgen" alt="Edgen logo" />
</div>

<p>Click on the Tauri, Vite, and React logos to learn more.</p>

<form
className="row"
onSubmit={(e) => {
e.preventDefault();
greet();
}}
>
<input
id="greet-input"
onChange={(e) => setName(e.currentTarget.value)}
placeholder="Enter a name..."
/>
<button type="submit">Greet</button>
</form>

<p>{greetMsg}</p>
<p>GUI coming soon</p>
</div>
);
}
Expand Down
23 changes: 23 additions & 0 deletions edgen/src/assets/edgen_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0b0a56

Please sign in to comment.