Skip to content

Commit 58e6d51

Browse files
committed
Update dependencies.
1 parent 8573fb0 commit 58e6d51

File tree

8 files changed

+961
-346
lines changed

8 files changed

+961
-346
lines changed

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"typescript.tsdk": "node_modules/.pnpm/[email protected]/node_modules/typescript/lib",
2+
"typescript.tsdk": "node_modules/typescript/lib",
33
"typescript.enablePromptUseWorkspaceTsdk": true
4-
}
4+
}

app/layout.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export default async function RootLayout({
1919
return (
2020
<html lang="en" className="h-full bg-gray-50">
2121
<body className="h-full">
22-
<Suspense fallback="...">
23-
{/* @ts-expect-error Server Component */}
22+
<Suspense>
2423
<Nav />
2524
</Suspense>
2625
{children}

app/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default async function IndexPage({
2525
</Text>
2626
<Search />
2727
<Card className="mt-6">
28-
{/* @ts-expect-error Server Component */}
2928
<UsersTable users={users} />
3029
</Card>
3130
</main>

app/playground/chart.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ const data = [
2020
}
2121
];
2222

23-
const valueFormatter = (number: number) =>
24-
`$ ${Intl.NumberFormat('us').format(number).toString()}`;
25-
26-
export default function Chart() {
23+
export default function Example() {
2724
return (
2825
<Card className="mt-8">
2926
<Title>Performance</Title>
@@ -34,7 +31,9 @@ export default function Chart() {
3431
categories={['Sales', 'Profit']}
3532
index="Month"
3633
colors={['indigo', 'fuchsia']}
37-
valueFormatter={valueFormatter}
34+
valueFormatter={(number: number) =>
35+
`$ ${Intl.NumberFormat('us').format(number).toString()}`
36+
}
3837
/>
3938
</Card>
4039
);

app/playground/page.tsx

+9-47
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Card, Metric, Text, Flex, Grid, Title, BarList } from '@tremor/react';
1+
'use client';
2+
3+
import { Card, Metric, Text, Title, BarList, Flex, Grid } from '@tremor/react';
24
import Chart from './chart';
35

46
const website = [
@@ -42,59 +44,17 @@ const data = [
4244
}
4345
];
4446

45-
const dataFormatter = (number: number) =>
46-
Intl.NumberFormat('us').format(number).toString();
47-
48-
const categories: {
49-
title: string;
50-
metric: string;
51-
metricPrev: string;
52-
}[] = [
53-
{
54-
title: 'Sales',
55-
metric: '$ 12,699',
56-
metricPrev: '$ 9,456'
57-
},
58-
{
59-
title: 'Profit',
60-
metric: '$ 40,598',
61-
metricPrev: '$ 45,564'
62-
},
63-
{
64-
title: 'Customers',
65-
metric: '1,072',
66-
metricPrev: '856'
67-
}
68-
];
69-
7047
export default function PlaygroundPage() {
7148
return (
7249
<main className="p-4 md:p-10 mx-auto max-w-7xl">
73-
<Grid className="gap-6" numColsSm={2} numColsLg={3}>
74-
{categories.map((item) => (
75-
<Card key={item.title}>
76-
<Flex alignItems="start">
77-
<Text>{item.title}</Text>
78-
</Flex>
79-
<Flex
80-
className="space-x-3 truncate"
81-
justifyContent="start"
82-
alignItems="baseline"
83-
>
84-
<Metric>{item.metric}</Metric>
85-
<Text className="truncate">from {item.metricPrev}</Text>
86-
</Flex>
87-
</Card>
88-
))}
89-
</Grid>
90-
<Grid className="mt-8 gap-6" numColsSm={2} numColsLg={3}>
50+
<Grid numItemsSm={2} numItemsLg={3} className="gap-6">
9151
{data.map((item) => (
9252
<Card key={item.category}>
9353
<Title>{item.category}</Title>
9454
<Flex
95-
className="space-x-2"
9655
justifyContent="start"
9756
alignItems="baseline"
57+
className="space-x-2"
9858
>
9959
<Metric>{item.stat}</Metric>
10060
<Text>Total views</Text>
@@ -104,9 +64,11 @@ export default function PlaygroundPage() {
10464
<Text className="text-right">Views</Text>
10565
</Flex>
10666
<BarList
107-
className="mt-2"
10867
data={item.data}
109-
valueFormatter={dataFormatter}
68+
valueFormatter={(number: number) =>
69+
Intl.NumberFormat('us').format(number).toString()
70+
}
71+
className="mt-2"
11072
/>
11173
</Card>
11274
))}

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@
88
"lint": "next lint"
99
},
1010
"dependencies": {
11-
"@headlessui/react": "^1.7.14",
11+
"@headlessui/react": "^1.7.15",
1212
"@heroicons/react": "^2.0.18",
1313
"@planetscale/database": "^1.7.0",
14-
"@tremor/react": "^2.5.0",
14+
"@tremor/react": "^3.0.1",
1515
"@types/js-cookie": "^3.0.3",
16-
"@types/node": "20.1.4",
17-
"@types/react": "18.2.6",
16+
"@types/node": "20.3.0",
17+
"@types/react": "18.2.11",
1818
"@types/react-dom": "18.2.4",
1919
"@vercel/analytics": "^1.0.1",
2020
"autoprefixer": "^10.4.14",
21-
"eslint": "8.40.0",
22-
"eslint-config-next": "13.4.2",
21+
"eslint": "8.42.0",
22+
"eslint-config-next": "13.4.5",
2323
"js-cookie": "^3.0.5",
24-
"kysely": "^0.24.2",
24+
"kysely": "^0.25.0",
2525
"kysely-planetscale": "^1.3.0",
26-
"next": "13.4.2",
26+
"next": "13.4.5",
2727
"next-auth": "^4.22.1",
28-
"postcss": "^8.4.23",
28+
"postcss": "^8.4.24",
2929
"prettier": "^2.8.8",
3030
"prop-types": "^15.8.1",
3131
"react": "18.2.0",
3232
"react-dom": "18.2.0",
3333
"server-only": "^0.0.1",
3434
"tailwindcss": "^3.3.2",
35-
"typescript": "5.0.4"
35+
"typescript": "5.1.3"
3636
},
3737
"prettier": {
3838
"arrowParens": "always",

0 commit comments

Comments
 (0)