From ef50c96431741a8d70f2275cbf85ca6c561bd962 Mon Sep 17 00:00:00 2001 From: looskie <50378828+Looskie@users.noreply.github.com> Date: Tue, 22 Jun 2021 14:07:38 -0400 Subject: [PATCH] Feat: use local API --- pages/index.tsx | 76 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 105b1a2..0d8565d 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,35 +1,65 @@ -import Head from 'next/head' -import styled from 'styled-components'; -import { useState } from 'react'; +import Head from "next/head"; +import styled from "styled-components"; +import { useState } from "react"; export default function Home() { - const [userId, setUserId] = useState(':id') + const [userId, setUserId] = useState(":id"); return ( <> - + Lanyard for GitHub Profile -
- 🏷️ lanyard-profile-readme -
+
🏷️ lanyard-profile-readme
-

Make sure you're in the Discord for this to work.

- setUserId(e.target.value))} /> - Copy the following and paste it into your README.md +

+ Make sure you're in the + + Discord + + for this to work. +

+ setUserId(e.target.value)} + /> + + Copy the following and paste it into your README.md + - [![Discord Presence](https://lanyard-profile-readme.vercel.app/api/{userId})](https://discord.com/users/{userId}) + [![Discord Presence](https://lanyard-profile-readme.vercel.app/api/{userId} + )](https://discord.com/users/{userId}) - For further customization, check out the repo! - + + For further customization, check out the + + repo + + ! + +
- ) + ); } const Background = styled.div` @@ -48,14 +78,14 @@ const Background = styled.div` flex-direction: column; justify-content: center; align-items: center; -` +`; const Header = styled.h1` font-size: 2rem; text-align: center; width: 100%; white-space: nowrap; -` +`; const Container = styled.div` min-width: 300px; @@ -75,7 +105,7 @@ const Container = styled.div` border: solid 0.5px #fff; border-radius: 0.5rem; margin-bottom: 1rem; -` +`; const Input = styled.input` margin: 10px 0 20px 0; @@ -91,7 +121,7 @@ const Input = styled.input` &::placeholder { text-align: center; } -` +`; const Link = styled.div` margin: 10px 0 20px 0; @@ -104,16 +134,16 @@ const Link = styled.div` background-color: #222; scrollbar-width: thin; -` +`; const Example = styled.img` margin-top: 1.5rem; - @media(max-height: 800px){ + @media (max-height: 800px) { display: none; } - @media(max-width: 1000px){ + @media (max-width: 1000px) { display: none; } -` \ No newline at end of file +`;