Skip to content

Commit 4aae383

Browse files
committed
feat: add typescript and rename all jsx file to tsx
1 parent 398d2a5 commit 4aae383

File tree

19 files changed

+112
-28
lines changed

19 files changed

+112
-28
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"typescript.enablePromptUseWorkspaceTsdk": true
4+
}
Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
import clsx from 'clsx';
2-
import { Interfaces } from 'doodle-icons';
3-
import { ExternalLink } from 'lucide-react';
4-
import Image from 'next/image';
5-
6-
import challenges from 'data/challenges.json';
7-
8-
import FigmaPreview from 'components/FigmaPreview';
9-
import Meta from 'components/Meta';
1+
import clsx from "clsx";
2+
import FigmaPreview from "components/FigmaPreview";
3+
import Meta from "components/Meta";
4+
import challenges from "data/challenges.json";
5+
import { Interfaces } from "doodle-icons";
6+
import { ExternalLink } from "lucide-react";
7+
import Image from "next/image";
8+
import { CSSProperties } from "react";
109

1110
export async function generateStaticParams() {
12-
return challenges.map(challenge => ({
13-
slug: challenge.slug
11+
return challenges.map((challenge) => ({
12+
slug: challenge.slug,
1413
}));
1514
}
1615

1716
async function getChallenge(slug) {
18-
const challenge = challenges.find(c => c.slug === slug);
17+
const challenge = challenges.find((c) => c.slug === slug);
1918

2019
return challenge;
2120
}
@@ -26,7 +25,7 @@ async function Page({ params: { slug } }) {
2625
return (
2726
<div
2827
style={{
29-
'--accent': challenge.accent
28+
"--accent": challenge.accent,
3029
}}
3130
>
3231
<FigmaPreview src={challenge.figma} />
@@ -35,9 +34,9 @@ async function Page({ params: { slug } }) {
3534
<div className="w-full lg:w-8/12">
3635
<div
3736
className={clsx(
38-
'relative p-10 lg:p-20',
39-
'border-4 border-black bg-[var(--accent)]',
40-
'shadow-solid'
37+
"relative p-10 lg:p-20",
38+
"border-4 border-black bg-[var(--accent)]",
39+
"shadow-solid"
4140
)}
4241
>
4342
<h1 className="font-display text-2xl lg:text-4xl">
@@ -76,9 +75,9 @@ async function Page({ params: { slug } }) {
7675
<div className="w-full space-y-10 lg:w-4/12">
7776
<div
7877
className={clsx(
79-
'relative px-10 py-10',
80-
'border-4 border-black bg-brand',
81-
'shadow-solid'
78+
"relative px-10 py-10",
79+
"border-4 border-black bg-brand",
80+
"shadow-solid"
8281
)}
8382
>
8483
<a
@@ -107,10 +106,10 @@ async function Page({ params: { slug } }) {
107106
</div>
108107
<div
109108
className={clsx(
110-
'relative px-10 py-10',
111-
'border-4 border-black bg-[#00FABE]',
112-
'space-y-8',
113-
'shadow-solid'
109+
"relative px-10 py-10",
110+
"border-4 border-black bg-[#00FABE]",
111+
"space-y-8",
112+
"shadow-solid"
114113
)}
115114
>
116115
<Meta
@@ -126,15 +125,15 @@ async function Page({ params: { slug } }) {
126125
</div>
127126
<div
128127
className={clsx(
129-
'px-10 py-10 border-4 border-black',
130-
'bg-[#FF508F] shadow-solid'
128+
"px-10 py-10 border-4 border-black",
129+
"bg-[#FF508F] shadow-solid"
131130
)}
132131
>
133132
<h2 className="text-2xl font-semibold">
134-
UI {challenge.designer.length > 1 ? 'designers' : 'designer'}
133+
UI {challenge.designer.length > 1 ? "designers" : "designer"}
135134
</h2>
136135
<div className="mt-4">
137-
{challenge.designer.map(designer => (
136+
{challenge.designer.map((designer) => (
138137
<div key={designer.name} className="flex items-center mt-4">
139138
<Image
140139
src={designer.avatar}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)