Skip to content

Commit

Permalink
Changed @chakra-ui/core to @chakra-ui/react
Browse files Browse the repository at this point in the history
  • Loading branch information
lelouchB committed Nov 13, 2020
2 parents d7099bf + 4d9098c commit 84ef3a1
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions pages/photos/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import Image from "next/image";
import Head from "next/head";
import Link from "next/link";
import { InfoIcon, AtSignIcon } from "@chakra-ui/icons";

export default function Photos({pic}) {

return (
export default function Photos({ pic }) {
return (
<Box p="2rem" bg="gray.200" minH="100vh">
<Head>
<title> Image: {pic.id}</title>
Expand All @@ -42,16 +40,16 @@ export default function Photos({pic}) {
</Box>{" "}
<Spacer />
<Link href={`/`} >
<Button
as="a"
borderRadius="full"
colorScheme="pink"
fontSize="lg"
size="lg"
cursor="pointer"
>
🏠 Home
</Button>
<Button
as="a"
borderRadius="full"
colorScheme="pink"
fontSize="lg"
size="lg"
cursor="pointer"
>
🏠 Home
</Button>
</Link>
</Flex>
<Divider my="1rem" />
Expand All @@ -70,15 +68,14 @@ export default function Photos({pic}) {
</Center>
</Box>

)
}
);
}

export async function getServerSideProps({ params }) {
const pic = await getPhotoById(params.id);
return {
props: {
pic,
},
};
}

export async function getServerSideProps({ params }) {
const pic = await getPhotoById(params.id);
return {
props: {
pic,
},
};
}

1 comment on commit 84ef3a1

@vercel
Copy link

@vercel vercel bot commented on 84ef3a1 Nov 13, 2020

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.