Skip to content

Commit

Permalink
Decoupole footer and add link
Browse files Browse the repository at this point in the history
  • Loading branch information
sansmoraxz committed May 17, 2024
1 parent 179724f commit e2a3134
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "./App.css";

import CodeEditorWindow from "./CodeEditorWindow";
import Footer from "./Footer";

// Create a standalone lua environment from the factory

Expand All @@ -12,7 +13,7 @@ function App() {
</h1>
<CodeEditorWindow />

<div className="text-center mt-4">Free to use, no sign up required.</div>
<Footer />
</>
);
}
Expand Down
20 changes: 20 additions & 0 deletions src/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useState } from "react";

const texts = [
"Free to use, no sign up required.",
<a href="https://github.com/sansmoraxz/lua-web-editor" target="_blank" rel="noreferrer">View Source</a>,
];

export default function Footer() {
const [state, setState] = useState(0);
return (
<div
className="text-center mt-4"
onMouseEnter={() => setState(1)}
onMouseLeave={() => setState(0)}
// href=""
>
{texts[state]}
</div>
);
}

0 comments on commit e2a3134

Please sign in to comment.