mirror of
https://github.com/System-End/site.git
synced 2026-04-19 15:18:18 +00:00
♻️ Change loose equality to strict equality
This commit is contained in:
parent
fe3c9bdef7
commit
ffb1d8cdc2
16 changed files with 68 additions and 68 deletions
|
|
@ -184,8 +184,8 @@ function Percentage({ fee }) {
|
|||
alignItems: 'center',
|
||||
bg: 'slate',
|
||||
color: 'green',
|
||||
width: [fee.length == 1 ? 70 : 80, fee.length == 1 ? 128 : 138],
|
||||
height: [fee.length == 1 ? 70 : 80, fee.length == 1 ? 128 : 138],
|
||||
width: [fee.length === 1 ? 70 : 80, fee.length === 1 ? 128 : 138],
|
||||
height: [fee.length === 1 ? 70 : 80, fee.length === 1 ? 128 : 138],
|
||||
borderRadius: 'circle',
|
||||
fontWeight: 'bold',
|
||||
justifyContent: 'center',
|
||||
|
|
@ -195,8 +195,8 @@ function Percentage({ fee }) {
|
|||
content: '"%"',
|
||||
fontSize: [24, 40],
|
||||
fontWeight: 'normal',
|
||||
marginRight: fee.length == 1 ? -2 : 0,
|
||||
marginLeft: [null, fee.length == 1 ? 2 : 0],
|
||||
marginRight: fee.length === 1 ? -2 : 0,
|
||||
marginLeft: [null, fee.length === 1 ? 2 : 0],
|
||||
color: 'muted'
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -97,12 +97,12 @@ export default function Bio({ popup = true, spanTwo = false, ...props }) {
|
|||
)}
|
||||
</Text>
|
||||
</Flex>
|
||||
{popup == false && (
|
||||
{!popup && (
|
||||
<Text mt={2} mb={0} color="black">
|
||||
{text}
|
||||
</Text>
|
||||
)}
|
||||
{popup == false && href && (
|
||||
{!popup && href && (
|
||||
<Flex sx={{ alignItems: 'center' }}>
|
||||
<Text
|
||||
sx={{
|
||||
|
|
@ -127,7 +127,7 @@ export default function Bio({ popup = true, spanTwo = false, ...props }) {
|
|||
)}
|
||||
</Box>
|
||||
</Card>
|
||||
{popup == true && expand && (
|
||||
{popup && expand && (
|
||||
<>
|
||||
<Flex
|
||||
sx={{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ const CardModel = ({
|
|||
)}
|
||||
{github_link != null ? (
|
||||
<Box>
|
||||
{position == 'bottom' ? (
|
||||
{position === 'bottom' ? (
|
||||
<Flex
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@ export default function Epoch() {
|
|||
|
||||
Object.keys(timeLeft).forEach(e => {
|
||||
if (!timeLeft[e]) {
|
||||
if (e == 'days') {
|
||||
if (e === 'days') {
|
||||
return
|
||||
} else if (e == 'hours') {
|
||||
} else if (e === 'hours') {
|
||||
if (!timeLeft['days']) {
|
||||
return
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
if (!timeLeft['days'] && !timeLeft['hours']) {
|
||||
return
|
||||
}
|
||||
|
|
@ -62,19 +62,19 @@ export default function Epoch() {
|
|||
|
||||
var name = ''
|
||||
|
||||
if (e == 'days') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
if (e === 'days') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'day'
|
||||
} else {
|
||||
name = 'days'
|
||||
}
|
||||
} else if (e == 'hours') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
} else if (e === 'hours') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'hour'
|
||||
} else {
|
||||
name = 'hours'
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
name = 'min'
|
||||
} else {
|
||||
name = 'sec'
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ export default function GitHub({
|
|||
rel="noopener"
|
||||
>
|
||||
{user != null ? (
|
||||
user != 'dependabot[bot]' ? (
|
||||
user != 'github-actions[bot]' ? (
|
||||
user !== 'dependabot[bot]' ? (
|
||||
user !== 'github-actions[bot]' ? (
|
||||
<img
|
||||
src={img}
|
||||
sx={{ borderRadius: '100%', height: '90%', mr: 2 }}
|
||||
|
|
@ -66,8 +66,8 @@ export default function GitHub({
|
|||
<></>
|
||||
)}
|
||||
{user != null ? (
|
||||
user != 'dependabot[bot]' ? (
|
||||
user != 'github-actions[bot]' ? (
|
||||
user !== 'dependabot[bot]' ? (
|
||||
user !== 'github-actions[bot]' ? (
|
||||
<Text
|
||||
sx={{
|
||||
mr: 2,
|
||||
|
|
@ -91,8 +91,8 @@ export default function GitHub({
|
|||
<></>
|
||||
)}
|
||||
{user != null ? (
|
||||
user != 'dependabot[bot]' ? (
|
||||
user != 'github-actions[bot]' ? (
|
||||
user !== 'dependabot[bot]' ? (
|
||||
user !== 'github-actions[bot]' ? (
|
||||
<Text
|
||||
sx={{
|
||||
textOverflow: 'ellipsis',
|
||||
|
|
@ -114,8 +114,8 @@ export default function GitHub({
|
|||
<></>
|
||||
)}
|
||||
{user != null ? (
|
||||
user != 'dependabot[bot]' ? (
|
||||
user != 'github-actions[bot]' ? (
|
||||
user !== 'dependabot[bot]' ? (
|
||||
user !== 'github-actions[bot]' ? (
|
||||
<Text
|
||||
as="span"
|
||||
sx={{
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ const JoinForm = ({ sx = {} }) => {
|
|||
: { reason: router.query.reason }
|
||||
})
|
||||
|
||||
const isAdult = useField('educationLevel').value == 'tertiary'
|
||||
const useWaitlist = process.env.NEXT_PUBLIC_OPEN != 'true'
|
||||
const isAdult = useField('educationLevel').value === 'tertiary'
|
||||
const useWaitlist = process.env.NEXT_PUBLIC_OPEN !== 'true'
|
||||
|
||||
return (
|
||||
<Card sx={{ maxWidth: 'narrow', mx: 'auto', label: { mb: 3 }, ...sx }}>
|
||||
|
|
@ -41,7 +41,7 @@ const JoinForm = ({ sx = {} }) => {
|
|||
<Select
|
||||
{...useField('continent')}
|
||||
required
|
||||
sx={{ color: useField('continent').value == '' ? 'muted' : '' }}
|
||||
sx={{ color: useField('continent').value === '' ? 'muted' : '' }}
|
||||
>
|
||||
<option value="" selected disabled hidden>
|
||||
Select a continent...
|
||||
|
|
@ -60,7 +60,7 @@ const JoinForm = ({ sx = {} }) => {
|
|||
{...useField('educationLevel')}
|
||||
required
|
||||
sx={{
|
||||
color: useField('educationLevel').value == '' ? 'muted' : ''
|
||||
color: useField('educationLevel').value === '' ? 'muted' : ''
|
||||
}}
|
||||
>
|
||||
<option value="" selected disabled hidden>
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ const Cards = ({ avatar, username, description, image }) => {
|
|||
<Flex
|
||||
as="a"
|
||||
href={
|
||||
username != 'cjmika110'
|
||||
username !== 'cjmika110'
|
||||
? `https://scrapbook.hackclub.com/${username}`
|
||||
: 'https://scrapbook.hackclub.com'
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ export default function Projects() {
|
|||
'3D printer'
|
||||
]
|
||||
|
||||
if (count == list.length - 1) {
|
||||
if (count === list.length - 1) {
|
||||
setCount(0)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export function middleware(request) {
|
|||
let url = request.nextUrl
|
||||
if (!url.searchParams.get('continent')) {
|
||||
let continent = country.findByIso2(request.geo.country || 'AU').continent
|
||||
if (continent == 'Oceania') {
|
||||
if (continent === 'Oceania') {
|
||||
continent = 'Australia'
|
||||
}
|
||||
url.searchParams.set('continent', continent)
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ export default function Geohot() {
|
|||
|
||||
Object.keys(timeLeft).forEach(e => {
|
||||
if (!timeLeft[e]) {
|
||||
if (e == 'days') {
|
||||
if (e === 'days') {
|
||||
return
|
||||
} else if (e == 'hours') {
|
||||
} else if (e === 'hours') {
|
||||
if (!timeLeft['days']) {
|
||||
return
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
if (!timeLeft['days'] && !timeLeft['hours']) {
|
||||
return
|
||||
}
|
||||
|
|
@ -66,19 +66,19 @@ export default function Geohot() {
|
|||
|
||||
var name = ''
|
||||
|
||||
if (e == 'days') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
if (e === 'days') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'day'
|
||||
} else {
|
||||
name = 'days'
|
||||
}
|
||||
} else if (e == 'hours') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
} else if (e === 'hours') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'hour'
|
||||
} else {
|
||||
name = 'hours'
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
name = 'min'
|
||||
} else {
|
||||
name = 'sec'
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ export default function Sal() {
|
|||
|
||||
Object.keys(timeLeft).forEach(e => {
|
||||
if (!timeLeft[e]) {
|
||||
if (e == 'days') {
|
||||
if (e === 'days') {
|
||||
return
|
||||
} else if (e == 'hours') {
|
||||
} else if (e === 'hours') {
|
||||
if (!timeLeft['days']) {
|
||||
return
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
if (!timeLeft['days'] && !timeLeft['hours']) {
|
||||
return
|
||||
}
|
||||
|
|
@ -66,19 +66,19 @@ export default function Sal() {
|
|||
|
||||
var name = ''
|
||||
|
||||
if (e == 'days') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
if (e === 'days') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'day'
|
||||
} else {
|
||||
name = 'days'
|
||||
}
|
||||
} else if (e == 'hours') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
} else if (e === 'hours') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'hour'
|
||||
} else {
|
||||
name = 'hours'
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
name = 'min'
|
||||
} else {
|
||||
name = 'sec'
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ export default function Vitalik() {
|
|||
|
||||
Object.keys(timeLeft).forEach(e => {
|
||||
if (!timeLeft[e]) {
|
||||
if (e == 'days') {
|
||||
if (e === 'days') {
|
||||
return
|
||||
} else if (e == 'hours') {
|
||||
} else if (e === 'hours') {
|
||||
if (!timeLeft['days']) {
|
||||
return
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
if (!timeLeft['days'] && !timeLeft['hours']) {
|
||||
return
|
||||
}
|
||||
|
|
@ -57,19 +57,19 @@ export default function Vitalik() {
|
|||
|
||||
var name = ''
|
||||
|
||||
if (e == 'days') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
if (e === 'days') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'day'
|
||||
} else {
|
||||
name = 'days'
|
||||
}
|
||||
} else if (e == 'hours') {
|
||||
if (timeLeft[e] == 1 || timeLeft[e] == 0) {
|
||||
} else if (e === 'hours') {
|
||||
if (timeLeft[e] === 1 || timeLeft[e] === 0) {
|
||||
name = 'hour'
|
||||
} else {
|
||||
name = 'hours'
|
||||
}
|
||||
} else if (e == 'min') {
|
||||
} else if (e === 'min') {
|
||||
name = 'min'
|
||||
} else {
|
||||
name = 'sec'
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ export default async function handler(req, res) {
|
|||
}
|
||||
|
||||
const data = req.body || {}
|
||||
const open = process.env.NEXT_PUBLIC_OPEN == 'true'
|
||||
const open = process.env.NEXT_PUBLIC_OPEN === 'true'
|
||||
const waitlist = !open
|
||||
const isAdult = data.educationLevel == 'tertiary'
|
||||
const isAdult = data.educationLevel === 'tertiary'
|
||||
|
||||
const secrets = (process.env.NAUGHTY || '').split(',')
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export async function Slack() {
|
|||
}
|
||||
).then(r => r.json())
|
||||
|
||||
if (slackData == null || slackData.stats == null) {
|
||||
if (!slackData || !slackData.stats) {
|
||||
console.warn("No slack data");
|
||||
return {}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export async function getConsoles() {
|
|||
).then(r => r.json())
|
||||
|
||||
function check(val) {
|
||||
return val == 'Pending' || val == 'Approved'
|
||||
return val === 'Pending' || val === 'Approved'
|
||||
}
|
||||
|
||||
const consoleCount = data
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { graphql } from '@octokit/graphql'
|
||||
|
||||
export async function fetchStars() {
|
||||
if (process.env.GITHUB_TOKEN == null) {
|
||||
if (!process.env.GITHUB_TOKEN) {
|
||||
console.warn("Note - GITHUB_TOKEN not defined, stars will not be fetched from github")
|
||||
return { sprig:"?", sinerider:"?", sprigHardware:"?", hackclub:"?", hackathons:"?"};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ function Page({
|
|||
`White sheets of paper\nWaiting to be printed on\nA blank console waits`
|
||||
)
|
||||
useEffect(() => {
|
||||
if (count == images.length - 1) {
|
||||
if (count === images.length - 1) {
|
||||
setCount(0)
|
||||
}
|
||||
}, [count])
|
||||
|
|
@ -349,7 +349,7 @@ function Page({
|
|||
figure: {
|
||||
position: 'absolute',
|
||||
transform:
|
||||
count % 2 == 0 ? 'rotate(3deg)' : 'rotate(-3deg)',
|
||||
count % 2 === 0 ? 'rotate(3deg)' : 'rotate(-3deg)',
|
||||
height: '85%',
|
||||
width: ['80%', '80%', '70%', '100%'],
|
||||
marginLeft: ['10%', '10%', '15%', '0']
|
||||
|
|
@ -362,14 +362,14 @@ function Page({
|
|||
>
|
||||
<Photo
|
||||
src={
|
||||
count == images.length - 2
|
||||
count === images.length - 2
|
||||
? images[0].src
|
||||
: images.length - 1
|
||||
? images[1].src
|
||||
: images[count + 2].src
|
||||
}
|
||||
alt={
|
||||
count == images.length - 2
|
||||
count === images.length - 2
|
||||
? images[0].alt
|
||||
: images.length - 1
|
||||
? images[1].alt
|
||||
|
|
@ -391,7 +391,7 @@ function Page({
|
|||
figure: {
|
||||
position: 'absolute',
|
||||
transform:
|
||||
count % 2 == 0 ? 'rotate(-3deg)' : 'rotate(3deg)',
|
||||
count % 2 === 0 ? 'rotate(-3deg)' : 'rotate(3deg)',
|
||||
height: '85%',
|
||||
width: ['80%', '80%', '70%', '100%'],
|
||||
marginLeft: ['10%', '10%', '15%', '0']
|
||||
|
|
@ -404,12 +404,12 @@ function Page({
|
|||
>
|
||||
<Photo
|
||||
src={
|
||||
count == images.length - 1
|
||||
count === images.length - 1
|
||||
? images[0].src
|
||||
: images[count + 1].src
|
||||
}
|
||||
alt={
|
||||
count == images.length - 1
|
||||
count === images.length - 1
|
||||
? images[0].alt
|
||||
: images[count + 1].alt
|
||||
}
|
||||
|
|
@ -429,7 +429,7 @@ function Page({
|
|||
figure: {
|
||||
position: 'absolute',
|
||||
transform:
|
||||
count % 2 == 0 ? 'rotate(3deg)' : 'rotate(-3deg)',
|
||||
count % 2 === 0 ? 'rotate(3deg)' : 'rotate(-3deg)',
|
||||
height: '85%',
|
||||
width: ['80%', '80%', '70%', '100%'],
|
||||
marginLeft: ['10%', '10%', '15%', '0']
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue