Skip to content

Commit e20ecc1

Browse files
author
Ethan
authored
Merge branch 'main' into dependabot/npm_and_yarn/react-syntax-highlighter-16.1.0
2 parents 01db8e5 + 9681e6d commit e20ecc1

File tree

37 files changed

+2421
-1788
lines changed

37 files changed

+2421
-1788
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v6
12-
- uses: actions/setup-node@v2
12+
- uses: actions/setup-node@v6
1313
- run: yarn install
1414
- run: yarn lint

components/arcade/prizes.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ const Prizes = ({
6262
position: 'relative',
6363
transform: `rotate(${pRotate}deg)`,
6464
transitionDuration: '0.5s',
65-
opacity: stock == 0 ? '0.5' : 1,
65+
opacity: stock === 0 ? '0.5' : 1,
6666
'&:hover': {
67-
transform: stock == 0 ? null : 'scale(1.1)',
68-
cursor: stock == 0 ? 'default' : 'pointer'
67+
transform: stock === 0 ? null : 'scale(1.1)',
68+
cursor: stock === 0 ? 'default' : 'pointer'
6969
}
7070
}}
7171
onClick={e => {
7272
const div = e.currentTarget
7373
const quantity = div.querySelector('[id*="dropdown-"]')
7474
const buy = div.querySelector('#buy')
75-
if (quantity === e.target || buy == e.target) {
75+
if (quantity === e.target || buy === e.target) {
7676
console.log('TRUE')
7777
return
7878
} else {
79-
stock != 0
79+
stock !== 0
8080
? document.getElementById(`${parsedFullName}-info`).showModal()
8181
: null
8282
}
@@ -98,7 +98,7 @@ const Prizes = ({
9898
alt={text}
9999
/>
100100
</Flex>
101-
{stock <= 100 && stock != null && (
101+
{stock <= 100 && stock !== null && (
102102
<Text
103103
sx={{
104104
background: '#CC6CE7',
@@ -113,7 +113,7 @@ const Prizes = ({
113113
variant="headline"
114114
className="gaegu"
115115
>
116-
{stock == 0 ? <>Sold out</> : <>Only {stock} left! </>}
116+
{stock === 0 ? <>Sold out</> : <>Only {stock} left! </>}
117117
</Text>
118118
)}
119119
<Text
@@ -161,7 +161,7 @@ const Prizes = ({
161161
(
162162
hoursBalance
163163
? hoursBalance / cost >= 2
164-
? stock != 0
164+
? stock !== 0
165165
: null
166166
: null
167167
) ? (
@@ -182,7 +182,7 @@ const Prizes = ({
182182
(
183183
hoursBalance
184184
? hoursBalance / cost >= 1
185-
? stock != 0
185+
? stock !== 0
186186
: null
187187
: null
188188
) ? (
@@ -289,7 +289,7 @@ const Prizes = ({
289289
variant="headline"
290290
className="gaegu"
291291
>
292-
{cost} {cost == 1 ? 'ticket' : 'tickets'}
292+
{cost} {cost === 1 ? 'ticket' : 'tickets'}
293293
</Text>
294294
<Flex
295295
sx={{
@@ -378,7 +378,7 @@ const Prizes = ({
378378
(
379379
hoursBalance
380380
? hoursBalance / cost >= 2
381-
? stock != 0
381+
? stock !== 0
382382
: null
383383
: null
384384
) ? (
@@ -398,7 +398,7 @@ const Prizes = ({
398398
(
399399
hoursBalance
400400
? hoursBalance / cost >= 1
401-
? stock != 0
401+
? stock !== 0
402402
: null
403403
: null
404404
) ? (

components/arcade/shop-component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function ShopComponent({
7777
>
7878
{availableItems
7979
.sort((a, b) => a['Cost Hours'] - b['Cost Hours'])
80-
.filter(item => (item['Stock'] > 0 || item['Stock'] == null))
80+
.filter(item => (item['Stock'] > 0 || item['Stock'] === null))
8181
.map((item) => (
8282
<Prizes
8383
img={item['Image URL']}
@@ -101,7 +101,7 @@ export default function ShopComponent({
101101
))}
102102
{availableItems
103103
.sort((a, b) => a['Cost Hours'] - b['Cost Hours'])
104-
.filter(item => (item['Stock'] == 0))
104+
.filter(item => (item['Stock'] === 0))
105105
.map((item) => (
106106
<Prizes
107107
img={item['Image URL']}

components/arcade/showcase/create-card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const CreateCard = ({ createCardLink }) => {
77
<>
88
<a href={createCardLink} className={styles.linkWrapper} rel="noopener noreferrer">
99
<div className={styles.card}>
10-
<img src={img}/>
10+
<img src={img} alt="Create a card" />
1111
Create a card
1212
</div>
1313
</a>

components/arcade/showcase/project-add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const NewProjectForm = ({ authToken }) => {
5252
success: 'Pulling repo data'
5353
}}
5454
sx={{
55-
background: status == 'error' ? '#DE4E2B' : '#09AFB4',
55+
background: status === 'error' ? '#DE4E2B' : '#09AFB4',
5656
borderRadius: '10px'
5757
}}
5858
/>

components/arcade/showcase/project-view.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const ProjectView = ({
6666
useEffect(() => {
6767
setDarkColor(darkenColor(color, 0.8))
6868
setInvertedColor(invertColor(textColor))
69+
// eslint-disable-next-line react-hooks/exhaustive-deps
6970
}, [color])
7071

7172
// function convertToRawUrl(githubUrl) {
@@ -133,8 +134,8 @@ const ProjectView = ({
133134
}}
134135
>
135136
<h1 className="slackey">{title}</h1>
136-
<h2>{description != 'Description Not Found' ? description : <></>}</h2>
137-
<h3>{user != 'User Not Found' ? <>By {user}</> : <></>}</h3>
137+
<h2>{description !== 'Description Not Found' ? description : <></>}</h2>
138+
<h3>{user !== 'User Not Found' ? <>By {user}</> : <></>}</h3>
138139

139140
<div
140141
className={styles.buttonGroup}
@@ -218,13 +219,13 @@ const ProjectView = ({
218219
display: 'grid',
219220
flexWrap: 'wrap',
220221
gridTemplateColumns:
221-
screenshot != '' && video != ''
222+
screenshot !== '' && video !== ''
222223
? ['1fr', '1fr 1fr', '1fr 1fr']
223224
: '1fr',
224225
gap: '10px'
225226
}}
226227
>
227-
{image != '' && (
228+
{image !== '' && (
228229
<div
229230
sx={{
230231
display: 'flex',
@@ -254,7 +255,7 @@ const ProjectView = ({
254255

255256
<p
256257
className={styles.description}
257-
sx={{ textAlign: screenshot.length != 1 ? 'center' : 'left' }}
258+
sx={{ textAlign: screenshot.length !== 1 ? 'center' : 'left' }}
258259
>
259260
<ReadmeRenderer markdown={markdown} />
260261
</p>

components/bio.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import Icon from '@hackclub/icons'
22
import { useState } from 'react'
3-
import { Avatar, Box, Card, Flex, Text } from 'theme-ui'
3+
import { Box, Card, Flex, Text } from 'theme-ui'
44

55
export default function Bio({ popup = true, spanTwo = false, ...props }) {
6-
const { img, name, teamRole, pronouns, text, subrole, email, href, video } =
6+
const { name, teamRole, pronouns, text, subrole, email, href, video, img } =
77
props
88
const [expand, setExpand] = useState(false)
99
return (
@@ -36,23 +36,21 @@ export default function Bio({ popup = true, spanTwo = false, ...props }) {
3636
}
3737
}}
3838
>
39-
<Avatar
40-
size={64}
41-
width={64}
42-
height={64}
43-
mr={3}
44-
src={img}
45-
alt={name}
46-
sx={{
47-
overflow: 'hidden',
48-
objectFit: 'cover',
49-
transition: 'transform 0.125s ease-in-out',
50-
'&:hover': { transform: 'rotate(-8deg) scale(1.25)' },
51-
flexShrink: 0,
52-
width: '64px',
53-
height: '64px'
54-
}}
55-
/>
39+
{img && (
40+
<Box
41+
as="img"
42+
src={img}
43+
alt={name}
44+
sx={{
45+
width: 96,
46+
height: 96,
47+
minWidth: 96,
48+
borderRadius: '50%',
49+
objectFit: 'cover',
50+
mr: 3
51+
}}
52+
/>
53+
)}
5654
<Box>
5755
<Text sx={{ fontSize: [3, 3, 3] }} variant="headline" color="black">
5856
{name}

0 commit comments

Comments
 (0)