diff --git a/components/arcade/prizes.js b/components/arcade/prizes.js new file mode 100644 index 00000000..029d5cc1 --- /dev/null +++ b/components/arcade/prizes.js @@ -0,0 +1,74 @@ +import React, { useState, useRef, useEffect } from 'react' +import { Box, Button, Text, Flex, Grid, Card, Link } from 'theme-ui' +import Balancer from 'react-wrap-balancer' + +/** @jsxImportSource theme-ui */ +const Prizes = ({ + img, + text, + subtext, + cost, + polaroidRotation, + ticketRotation, + link, + ...props +}) => { + return ( + + + + + + + {text} + + + {text} + + + + {subtext} + + + + {cost} {cost == 1 ? 'ticket' : 'tickets'} + + + + ) +} + +export default Prizes diff --git a/pages/arcade/shop.js b/pages/arcade/shop.js index 22950715..f8860883 100644 --- a/pages/arcade/shop.js +++ b/pages/arcade/shop.js @@ -1,69 +1,67 @@ -import { inventoryParts } from "../api/arcade/inventory" -import { Box } from 'theme-ui' +import { inventoryParts } from '../api/arcade/inventory' +import { Box, Grid } from 'theme-ui' +import Prizes from '../../components/arcade/prizes' +const styled = ` +@import url('https://fonts.googleapis.com/css2?family=Slackey&family=Emblema+One&family=Gaegu&display=swap'); +.slackey { + font-family: "Slackey", sans-serif; + } + + .gaegu { + font-family: "Gaegu", sans-serif; +} + +` /** @jsxImportSource theme-ui */ -const ShopPage = ({parts}) => { +const ShopPage = ({ parts }) => { return ( -
- -

Shop

- - - + +
) } @@ -79,4 +77,4 @@ export async function getStaticProps() { parts } } -} \ No newline at end of file +} diff --git a/pages/arcade/shop/[slackID].js b/pages/arcade/shop/[slackID].js index 13d578cc..35e1823f 100644 --- a/pages/arcade/shop/[slackID].js +++ b/pages/arcade/shop/[slackID].js @@ -1,32 +1,69 @@ -import { Image, Link } from 'theme-ui' - +import { Image, Link, Text } from 'theme-ui' import { inventoryParts } from '../../api/arcade/inventory' import { useRouter } from 'next/router' - +import { Box, Grid } from 'theme-ui' +import Prizes from '../../../components/arcade/prizes' /** @jsxImportSource theme-ui */ +const styled = ` +@import url('https://fonts.googleapis.com/css2?family=Slackey&family=Emblema+One&family=Gaegu&display=swap'); + +.slackey { + font-family: "Slackey", sans-serif; + } + + .gaegu { + font-family: "Gaegu", sans-serif; +} + +body { + background-color: #FAEFD6; +} + +` function orderLink(slackID, url) { return url + '&slackID=' + slackID } - -const ShopPage = ({parts, ...props}) => { +const ShopPage = ({ parts, ...props }) => { const router = useRouter() const { slackID } = router.query return ( -
-

+

Shop

- This link is your own! Don't share it with others. Slack ID: {slackID} - Click on the part name to order it. - + +
) } @@ -57,8 +109,8 @@ export async function getStaticProps() { } export async function getStaticPaths() { - return ({ + return { paths: [], fallback: 'blocking' - }) + } }