Working login, but session not implemented yet
This commit is contained in:
parent
84ff8df612
commit
241ebe07f2
9 changed files with 304 additions and 21 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import shortlinkLogo from '../assets/trx-shortlink-orange.png'
|
||||
import '../App.css'
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
const Copylink = () => {
|
||||
|
||||
const { id } = useParams<{ id: string }>();
|
||||
|
||||
return (
|
||||
<>
|
||||
<header>
|
||||
|
|
@ -14,20 +17,20 @@ const Copylink = () => {
|
|||
|
||||
</ul>
|
||||
<ul id="rightlist">
|
||||
<li id="login"> <a draggable="false" href='login'>Login</a></li>
|
||||
<li id="login"> <a draggable="false" href='/login'>Login</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<div id="logoname">
|
||||
<a href="#" >
|
||||
<a href="/home" >
|
||||
<img src={shortlinkLogo} draggable="false" className="logo" alt="trx shortlink logo" />
|
||||
</a>
|
||||
<h1>trx shortlink</h1>
|
||||
</div>
|
||||
<div className="card">
|
||||
<input className="input" id="oriurl"></input>
|
||||
<button id="button_short" onClick={() => 0}>
|
||||
<input className="input" id="shorturl" readOnly value={`http://localhost:3000/${id}`}></input>
|
||||
<button id="button_copy" onClick={() => navigator.clipboard.writeText((document.getElementById("shorturl") as HTMLInputElement).value) && alert("The shortlink was copied!")}>
|
||||
Copy!
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue