Skip to content

Commit

Permalink
feat: ✨ add links from dashboard (#9)
Browse files Browse the repository at this point in the history
* add button to create links
* minor changes
* remove host on short url list
  • Loading branch information
carlosazaustre committed Jul 11, 2021
1 parent 06a5181 commit 7073442
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
6 changes: 3 additions & 3 deletions components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ export function Footer() {
justify="center"
textAlign="center">
<Text fontSize="sm" color="gray.500">
Powered by{" "}
Made by{" "}
<span role="img" aria-label="love">
❤️
</span>{" "}
</span>
&amp;{" "}
<span role="img" aria-label="code">
💻
</span>{" "}
by <Link href="//carlosazaustre.es">Carlos Azaustre</Link>
</Text>
<Text fontSize="xs" color="gray.500">
Hosted on <Link href="//vercel.com">Vercel</Link> &{" "}
Powered by <Link href="//vercel.com">Vercel</Link> &{" "}
<Link href="/zipuc3s">Digital Ocean</Link>
</Text>
</Flex>
Expand Down
19 changes: 19 additions & 0 deletions components/Nav.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useUser } from "@auth0/nextjs-auth0";
import { AddIcon } from "@chakra-ui/icons";
import { Flex, LinkBox, LinkOverlay, Text } from "@chakra-ui/react";

export function Nav() {
Expand All @@ -17,6 +18,23 @@ export function Nav() {
justify="flex-end"
align="center">
<Text mr={4}>Hi, {user.email}!</Text>

<LinkBox
borderWidth="1px"
borderColor="purple.500"
px={4}
py={2}
mr={4}
lineHeight={6}
rounded="lg"
maxW="md"
_hover={{ bg: "purple.500", color: "white" }}>
<AddIcon />
<LinkOverlay ml={2} href="/">
Create Link
</LinkOverlay>
</LinkBox>

<LinkBox
borderWidth="1px"
borderColor="purple.500"
Expand All @@ -28,6 +46,7 @@ export function Nav() {
_hover={{ bg: "purple.500", color: "white" }}>
<LinkOverlay href="/dashboard">My Links</LinkOverlay>
</LinkBox>

<LinkBox
borderWidth="1px"
borderColor="purple.500"
Expand Down
5 changes: 1 addition & 4 deletions pages/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ export default function Dashboard({ links }) {
</Td>
<Td>
<LinkIcon color="purple.500" />
<Link
ml={2}
color="purple.500"
href={`//czstr.link/${link.shortUrl}`}>
<Link ml={2} color="purple.500" href={`/${link.shortUrl}`}>
czstr.link/<strong>{link.shortUrl}</strong>
</Link>
</Td>
Expand Down

1 comment on commit 7073442

@vercel
Copy link

@vercel vercel bot commented on 7073442 Jul 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.