Skip to content

Commit 840276f

Browse files
committed
chore: tidied code
1 parent b1925bc commit 840276f

102 files changed

Lines changed: 6250 additions & 2626 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
DATABASE_URL=
2-
31
API_KEY=
2+
API_VERSION=
3+
DISCORD_API_VERSION=
4+
5+
STAFF_SERVER_ID=
6+
SERVER_ID=
47

58
TOKEN=
69
CLIENT_ID=
710
CLIENT_SECRET=
811

9-
NEXTAUTH_URL=http://localhost:3000/
12+
ARC_SCRIPT=
13+
14+
NEXTAUTH_URL=
1015
NEXTAUTH_SECRET=
1116

1217
# Contact a contributor for more information on these environment variables

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"*.ts": [
3+
"npm run format"
4+
],
5+
"*.tsx": [
6+
"npm run format"
7+
],
8+
"*.js": [
9+
"npm run format"
10+
]
11+
}

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSameLine": true,
4+
"bracketSpacing": true,
5+
"singleQuote": false,
6+
"tabWidth": 4,
7+
"trailingComma": "none",
8+
"semi": true,
9+
"parser": "typescript"
10+
}

components/icons/Balance.tsx

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
11
import type { GenericProps, NextComponent } from "../../types/main";
2-
import { ReactTooltip } from "../../lib/next/components";
2+
import { ReactTooltip } from "../layout/Next";
33

44
type BalanceProps = GenericProps & {
55
tooltip?: boolean;
66
};
77

8-
export const Balance: NextComponent<BalanceProps> = ({ className, style, tooltip }: BalanceProps): JSX.Element => {
8+
export const Balance: NextComponent<BalanceProps> = ({
9+
className,
10+
style,
11+
tooltip
12+
}: BalanceProps): JSX.Element => {
913
let icon: SVGSVGElement | null;
1014

1115
return (
1216
<>
13-
<svg xmlns="http://www.w3.org/2000/svg" height="30" viewBox="0 0 24 24" width="30" ref={(ref: SVGSVGElement | null): SVGSVGElement | null => icon = ref} className={className} style={style} data-tip={tooltip ? "Hypesquad Balance" : undefined} onMouseEnter={(): {} => ReactTooltip.show(icon as SVGSVGElement)} onMouseLeave={(): {} => ReactTooltip.hide(icon as SVGSVGElement)}>
14-
<path xmlns="http://www.w3.org/2000/svg" clipRule="evenodd" d="m11.8622 4.05696c.076-.07595.1996-.07595.2756 0l7.8048 7.80474c.0371.0362.0574.0865.0574.1377 0 .0513-.0212.1016-.0574.1378l-7.8048 7.8047c-.038.038-.0883.0574-.1378.0574s-.0998-.0194-.1378-.0574l-7.8048-7.8047c-.03709-.0362-.0574-.0857-.0574-.1378s.02031-.1015.0574-.1377zm.9299 8.29474 3.6146-2.37377c.0909-.05917.2013.03977.151.13597l-1.4986 2.9416c-.0354.0707.0158.1537.0944.1537h.8973c.1033 0 .1457.1316.0618.1916l-4.0517 2.9028c-.0362.0265-.0856.0265-.1227 0l-4.05168-2.9028c-.08301-.06-.04062-.1916.06182-.1916h.89634c.07948 0 .1307-.083.09449-.1537l-1.49862-2.9416c-.04945-.0962.06094-.19514.1519-.13597l3.61545 2.37377c.0627.0415.113.098.1465.1651l.5511 1.1057c.0389.0777.1501.0777.189 0l.551-1.1057c.0336-.0671.0839-.1245.1466-.1651z" fill="#45ddc0" fillRule="evenodd" />
17+
<svg
18+
xmlns="http://www.w3.org/2000/svg"
19+
height="30"
20+
viewBox="0 0 24 24"
21+
width="30"
22+
ref={(ref: SVGSVGElement | null): SVGSVGElement | null =>
23+
(icon = ref)
24+
}
25+
className={className}
26+
style={style}
27+
data-tip={tooltip ? "Hypesquad Balance" : undefined}
28+
onMouseEnter={(): {} =>
29+
ReactTooltip.show(icon as SVGSVGElement)
30+
}
31+
onMouseLeave={(): {} =>
32+
ReactTooltip.hide(icon as SVGSVGElement)
33+
}>
34+
<path
35+
xmlns="http://www.w3.org/2000/svg"
36+
clipRule="evenodd"
37+
d="m11.8622 4.05696c.076-.07595.1996-.07595.2756 0l7.8048 7.80474c.0371.0362.0574.0865.0574.1377 0 .0513-.0212.1016-.0574.1378l-7.8048 7.8047c-.038.038-.0883.0574-.1378.0574s-.0998-.0194-.1378-.0574l-7.8048-7.8047c-.03709-.0362-.0574-.0857-.0574-.1378s.02031-.1015.0574-.1377zm.9299 8.29474 3.6146-2.37377c.0909-.05917.2013.03977.151.13597l-1.4986 2.9416c-.0354.0707.0158.1537.0944.1537h.8973c.1033 0 .1457.1316.0618.1916l-4.0517 2.9028c-.0362.0265-.0856.0265-.1227 0l-4.05168-2.9028c-.08301-.06-.04062-.1916.06182-.1916h.89634c.07948 0 .1307-.083.09449-.1537l-1.49862-2.9416c-.04945-.0962.06094-.19514.1519-.13597l3.61545 2.37377c.0627.0415.113.098.1465.1651l.5511 1.1057c.0389.0777.1501.0777.189 0l.551-1.1057c.0336-.0671.0839-.1245.1466-.1651z"
38+
fill="#45ddc0"
39+
fillRule="evenodd"
40+
/>
1541
</svg>
1642
<ReactTooltip class="tooltip" effect="solid" />
1743
</>
1844
);
19-
};
45+
};

components/icons/Booster.tsx

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
import type { GenericProps, NextComponent } from "../../types/main";
2-
import { ReactTooltip } from "../../lib/next/components";
2+
import { ReactTooltip } from "../layout/Next";
33

44
type BoosterProps = GenericProps & {
55
tooltip?: boolean;
66
};
77

8-
export const Booster: NextComponent<BoosterProps> = ({ className, style, tooltip }: BoosterProps): JSX.Element => {
8+
export const Booster: NextComponent<BoosterProps> = ({
9+
className,
10+
style,
11+
tooltip
12+
}: BoosterProps): JSX.Element => {
913
let icon: SVGSVGElement | null;
1014

1115
return (
1216
<>
13-
<svg ref={(ref: SVGSVGElement | null): SVGSVGElement | null => icon = ref} className={className} style={style} aria-hidden="false" width="24" height="24" viewBox="0 0 8 12" data-tip={tooltip ? "Server Booster" : undefined} onMouseEnter={(): {} => ReactTooltip.show(icon as SVGSVGElement)} onMouseLeave={(): {} => ReactTooltip.hide(icon as SVGSVGElement)}>
14-
<path d="M4 0L0 4V8L4 12L8 8V4L4 0ZM7 7.59L4 10.59L1 7.59V4.41L4 1.41L7 4.41V7.59Z" fill="currentColor"></path>
15-
<path d="M2 4.83V7.17L4 9.17L6 7.17V4.83L4 2.83L2 4.83Z" fill="currentColor"></path>
17+
<svg
18+
ref={(ref: SVGSVGElement | null): SVGSVGElement | null =>
19+
(icon = ref)
20+
}
21+
className={className}
22+
style={style}
23+
aria-hidden="false"
24+
width="24"
25+
height="24"
26+
viewBox="0 0 8 12"
27+
data-tip={tooltip ? "Server Booster" : undefined}
28+
onMouseEnter={(): {} =>
29+
ReactTooltip.show(icon as SVGSVGElement)
30+
}
31+
onMouseLeave={(): {} =>
32+
ReactTooltip.hide(icon as SVGSVGElement)
33+
}>
34+
<path
35+
d="M4 0L0 4V8L4 12L8 8V4L4 0ZM7 7.59L4 10.59L1 7.59V4.41L4 1.41L7 4.41V7.59Z"
36+
fill="currentColor"></path>
37+
<path
38+
d="M2 4.83V7.17L4 9.17L6 7.17V4.83L4 2.83L2 4.83Z"
39+
fill="currentColor"></path>
1640
</svg>
1741
<ReactTooltip class="tooltip" effect="solid" />
1842
</>
1943
);
20-
};
44+
};

components/icons/Bravery.tsx

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
11
import type { GenericProps, NextComponent } from "../../types/main";
2-
import { ReactTooltip } from "../../lib/next/components";
2+
import { ReactTooltip } from "../layout/Next";
33

44
type BraveryProps = GenericProps & {
55
tooltip?: boolean;
66
};
77

8-
export const Bravery: NextComponent<BraveryProps> = ({ className, style, tooltip }: BraveryProps): JSX.Element => {
8+
export const Bravery: NextComponent<BraveryProps> = ({
9+
className,
10+
style,
11+
tooltip
12+
}: BraveryProps): JSX.Element => {
913
let icon: SVGSVGElement | null;
1014

1115
return (
1216
<>
13-
<svg xmlns="http://www.w3.org/2000/svg" height="30" viewBox="0 0 24 24" width="30" ref={(ref: SVGSVGElement | null): SVGSVGElement | null => icon = ref} className={className} style={style} data-tip={tooltip ? "Hypesquad Bravery" : undefined} onMouseEnter={(): {} => ReactTooltip.show(icon as SVGSVGElement)} onMouseLeave={(): {} => ReactTooltip.hide(icon as SVGSVGElement)}>
14-
<path clipRule="evenodd" d="m5.01502 4h13.97008c.1187 0 .215.09992.215.22305v9.97865c0 .0697-.0312.1343-.0837.1767l-6.985 5.5752c-.0389.0313-.0847.0464-.1314.0464-.0466 0-.0924-.0151-.1313-.0464l-6.985-5.5752c-.05252-.0424-.08365-.107-.08365-.1767v-9.97865c0-.12313.0963-.22305.21497-.22305zm7.82148 7.0972 4.1275-2.71296c.1039-.06863.2299.04542.1725.15644l-1.7114 3.36192c-.0403.0807.0182.1756.1079.1756h1.0246c.118 0 .1664.1504.0706.219l-4.6267 3.3175c-.0414.0303-.0978.0303-.1402 0l-4.6267-3.3175c-.0948-.0686-.04639-.219.07059-.219h1.02356c.09076 0 .14925-.0949.10791-.1756l-1.71132-3.36293c-.05648-.11001.06958-.22305.17345-.15543l4.12851 2.71296c.0716.0474.1291.112.1674.1887l.6293 1.2636c.0444.0888.1714.0888.2158 0l.6293-1.2636c.0383-.0767.0958-.1423.1674-.1887z" fill="#9c84ef" fillRule="evenodd" />
17+
<svg
18+
xmlns="http://www.w3.org/2000/svg"
19+
height="30"
20+
viewBox="0 0 24 24"
21+
width="30"
22+
ref={(ref: SVGSVGElement | null): SVGSVGElement | null =>
23+
(icon = ref)
24+
}
25+
className={className}
26+
style={style}
27+
data-tip={tooltip ? "Hypesquad Bravery" : undefined}
28+
onMouseEnter={(): {} =>
29+
ReactTooltip.show(icon as SVGSVGElement)
30+
}
31+
onMouseLeave={(): {} =>
32+
ReactTooltip.hide(icon as SVGSVGElement)
33+
}>
34+
<path
35+
clipRule="evenodd"
36+
d="m5.01502 4h13.97008c.1187 0 .215.09992.215.22305v9.97865c0 .0697-.0312.1343-.0837.1767l-6.985 5.5752c-.0389.0313-.0847.0464-.1314.0464-.0466 0-.0924-.0151-.1313-.0464l-6.985-5.5752c-.05252-.0424-.08365-.107-.08365-.1767v-9.97865c0-.12313.0963-.22305.21497-.22305zm7.82148 7.0972 4.1275-2.71296c.1039-.06863.2299.04542.1725.15644l-1.7114 3.36192c-.0403.0807.0182.1756.1079.1756h1.0246c.118 0 .1664.1504.0706.219l-4.6267 3.3175c-.0414.0303-.0978.0303-.1402 0l-4.6267-3.3175c-.0948-.0686-.04639-.219.07059-.219h1.02356c.09076 0 .14925-.0949.10791-.1756l-1.71132-3.36293c-.05648-.11001.06958-.22305.17345-.15543l4.12851 2.71296c.0716.0474.1291.112.1674.1887l.6293 1.2636c.0444.0888.1714.0888.2158 0l.6293-1.2636c.0383-.0767.0958-.1423.1674-.1887z"
37+
fill="#9c84ef"
38+
fillRule="evenodd"
39+
/>
1540
</svg>
1641
<ReactTooltip class="tooltip" effect="solid" />
1742
</>
1843
);
19-
};
44+
};

components/icons/Brilliance.tsx

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
11
import type { GenericProps, NextComponent } from "../../types/main";
2-
import { ReactTooltip } from "../../lib/next/components";
2+
import { ReactTooltip } from "../layout/Next";
33

44
type BrillianceProps = GenericProps & {
55
tooltip?: boolean;
66
};
77

8-
export const Brilliance: NextComponent<BrillianceProps> = ({ className, style, tooltip }: BrillianceProps): JSX.Element => {
8+
export const Brilliance: NextComponent<BrillianceProps> = ({
9+
className,
10+
style,
11+
tooltip
12+
}: BrillianceProps): JSX.Element => {
913
let icon: SVGSVGElement | null;
1014

1115
return (
1216
<>
13-
<svg xmlns="http://www.w3.org/2000/svg" height="30" viewBox="0 0 24 24" width="30" ref={(ref: SVGSVGElement | null): SVGSVGElement | null => icon = ref} className={className} style={style} data-tip={tooltip ? "Hypesquad Brilliance" : undefined} onMouseEnter={(): {} => ReactTooltip.show(icon as SVGSVGElement)} onMouseLeave={(): {} => ReactTooltip.hide(icon as SVGSVGElement)}>
14-
<path xmlns="http://www.w3.org/2000/svg" clipRule="evenodd" d="m12 20c4.4183 0 8-3.5817 8-8 0-4.41828-3.5817-8-8-8-4.41828 0-8 3.58172-8 8 0 4.4183 3.58172 8 8 8zm.7921-8.275 3.6146-2.3738c.0909-.05916.2013.03974.151.136l-1.4986 2.9416c-.0354.0707.0158.1537.0944.1537h.8973c.1033 0 .1457.1315.0618.1916l-4.0517 2.9027c-.0362.0265-.0856.0265-.1227 0l-4.05168-2.9027c-.08301-.0601-.04062-.1916.06182-.1916h.89634c.07948 0 .1307-.083.09449-.1537l-1.49862-2.9416c-.04945-.09626.06094-.19516.1519-.136l3.61545 2.3738c.0627.0415.113.098.1465.1651l.5511 1.1057c.0389.0777.1501.0777.189 0l.551-1.1057c.0336-.0671.0839-.1245.1466-.1651z" fill="#f47b67" fillRule="evenodd" />
17+
<svg
18+
xmlns="http://www.w3.org/2000/svg"
19+
height="30"
20+
viewBox="0 0 24 24"
21+
width="30"
22+
ref={(ref: SVGSVGElement | null): SVGSVGElement | null =>
23+
(icon = ref)
24+
}
25+
className={className}
26+
style={style}
27+
data-tip={tooltip ? "Hypesquad Brilliance" : undefined}
28+
onMouseEnter={(): {} =>
29+
ReactTooltip.show(icon as SVGSVGElement)
30+
}
31+
onMouseLeave={(): {} =>
32+
ReactTooltip.hide(icon as SVGSVGElement)
33+
}>
34+
<path
35+
xmlns="http://www.w3.org/2000/svg"
36+
clipRule="evenodd"
37+
d="m12 20c4.4183 0 8-3.5817 8-8 0-4.41828-3.5817-8-8-8-4.41828 0-8 3.58172-8 8 0 4.4183 3.58172 8 8 8zm.7921-8.275 3.6146-2.3738c.0909-.05916.2013.03974.151.136l-1.4986 2.9416c-.0354.0707.0158.1537.0944.1537h.8973c.1033 0 .1457.1315.0618.1916l-4.0517 2.9027c-.0362.0265-.0856.0265-.1227 0l-4.05168-2.9027c-.08301-.0601-.04062-.1916.06182-.1916h.89634c.07948 0 .1307-.083.09449-.1537l-1.49862-2.9416c-.04945-.09626.06094-.19516.1519-.136l3.61545 2.3738c.0627.0415.113.098.1465.1651l.5511 1.1057c.0389.0777.1501.0777.189 0l.551-1.1057c.0336-.0671.0839-.1245.1466-.1651z"
38+
fill="#f47b67"
39+
fillRule="evenodd"
40+
/>
1541
</svg>
1642
<ReactTooltip class="tooltip" />
1743
</>
1844
);
19-
};
45+
};

components/layout/AnimatedContainer.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

components/layout/CallToAction.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)