Skip to content

Commit

Permalink
blot card star count!
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyab committed Oct 26, 2023
1 parent 7828fcc commit bae308b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
7 changes: 3 additions & 4 deletions components/index/cards/haxidraw.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import CardModel from './card-model'
import { Box, Flex, Grid, Image, Link, Text } from 'theme-ui'
import { Box, Flex, Grid, Text } from 'theme-ui'
import Buttons from './button'
import styled from '@emotion/styled'
import RelativeTime from 'react-relative-time'

/** @jsxImportSource theme-ui */

export default function Haxidraw() {
export default function Haxidraw({ stars }) {
return (
<CardModel
github_link="https://github.com/hackclub/blot/"
Expand All @@ -19,6 +17,7 @@ export default function Haxidraw() {
position={[null, 'bottom', 'bottom']}
highlight="#271932"
filter="brightness(0.8)"
stars={stars}
>
<Text variant="title" as="h3" sx={{ fontSize: ['36px', 4, 5] }}>
Blot
Expand Down
6 changes: 5 additions & 1 deletion pages/api/stars.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export async function fetchStars() {
sinerider: '?',
sprigHardware: '?',
hackclub: '?',
hackathons: '?'
hackathons: '?',
blot: '?'
}
}
const { organization } = await graphql(
Expand All @@ -32,6 +33,9 @@ export async function fetchStars() {
sprigHardware: repository(name: "sprig-hardware") {
stargazerCount
}
blot: repository(name: "blot") {
stargazerCount
}
}
}
`,
Expand Down
14 changes: 2 additions & 12 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
import {
Box,
Button,
Card,
Grid,
Heading,
Flex,
Badge,
Link,
Text
} from 'theme-ui'
import { Badge, Box, Button, Card, Flex, Grid, Heading, Link, Text } from 'theme-ui'
import React, { useEffect, useRef, useState } from 'react'
import Head from 'next/head'
import { useRouter } from 'next/router'
Expand Down Expand Up @@ -758,7 +748,7 @@ function Page({
gameImage={gameImage}
gameImage1={gameImage1}
/>
<Haxidraw />
<Haxidraw stars={stars.blot.stargazerCount} delay={100} />
<Sinerider delay={200} stars={stars.sinerider.stargazerCount} />
<Box as="section" id="sprig">
<SprigConsole
Expand Down

0 comments on commit bae308b

Please sign in to comment.