mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-25 20:00:40 +00:00
30 lines
1006 B
TypeScript
30 lines
1006 B
TypeScript
import Head from "next/head";
|
|
import styled from "styled-components";
|
|
import { useState } from "react";
|
|
|
|
export default function Home() {
|
|
const [userId, setUserId] = useState(":id");
|
|
const [copyState, setCopyState] = useState("Copy");
|
|
const copy = () => {
|
|
navigator.clipboard.writeText(`[](https://discord.com/users/${userId})`);
|
|
setCopyState("Copied!");
|
|
|
|
setTimeout(() => setCopyState("Copy"), 1500);
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<Head>
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
<title>Lanyard for GitHub Profile</title>
|
|
</Head>
|
|
|
|
|
|
</>
|
|
);
|
|
} |