initial maddafacka
This commit is contained in:
commit
57a252b983
16 changed files with 4135 additions and 0 deletions
43
src/App.jsx
Normal file
43
src/App.jsx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import React, { useState } from 'react';
|
||||
import { HashRouter, Routes, Route, Link } from 'react-router-dom';
|
||||
import TemplateCreator from './components/TemplateCreator';
|
||||
import TemplateApplier from './components/TemplateApplier';
|
||||
import './App.css';
|
||||
|
||||
function App() {
|
||||
const [connectedPubkey, setConnectedPubkey] = useState(null);
|
||||
|
||||
return (
|
||||
<HashRouter>
|
||||
<div className="app">
|
||||
<header className="app-header">
|
||||
<h1>⚡ Relay Template</h1>
|
||||
<nav>
|
||||
<Link to="/">🏠 Create Template</Link>
|
||||
{/* Remove the broken link - users will access /apply/:encoded via generated links */}
|
||||
</nav>
|
||||
{connectedPubkey && (
|
||||
<div className="user-badge">
|
||||
✅ {connectedPubkey.slice(0, 8)}...
|
||||
</div>
|
||||
)}
|
||||
</header>
|
||||
<main>
|
||||
<Routes>
|
||||
<Route path="/" element={
|
||||
<TemplateCreator setConnectedPubkey={setConnectedPubkey} />
|
||||
} />
|
||||
<Route path="/apply/:encoded" element={
|
||||
<TemplateApplier connectedPubkey={connectedPubkey} setConnectedPubkey={setConnectedPubkey} />
|
||||
} />
|
||||
</Routes>
|
||||
</main>
|
||||
<footer>
|
||||
<p>Self-contained • Built with Nostr</p>
|
||||
</footer>
|
||||
</div>
|
||||
</HashRouter>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Loading…
Add table
Add a link
Reference in a new issue