Skip to content

Commit 2cce1c0

Browse files
committed
refactor: prepare sanity and next upgrades
1 parent 806826d commit 2cce1c0

File tree

6 files changed

+23
-25
lines changed

6 files changed

+23
-25
lines changed

components/shared/ImageBox.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,24 @@ export default function ImageBox({
1717
height = 2000,
1818
size = '100vw',
1919
classesWrapper,
20+
...props
2021
}: ImageBoxProps) {
2122
const imageUrl = image && urlForImage(image)?.height(height).width(width).fit('crop').url()
2223

2324
return (
24-
<div className={`w-full overflow-hidden rounded-[3px] bg-gray-50 ${classesWrapper}`}>
25+
<div
26+
className={`w-full overflow-hidden rounded-[3px] bg-gray-50 ${classesWrapper}`}
27+
data-sanity={props['data-sanity']}
28+
>
2529
{imageUrl && (
26-
<Image className="absolute h-full w-full" alt={alt} width={width} height={height} sizes={size} src={imageUrl} />
30+
<Image
31+
className="absolute h-full w-full"
32+
alt={alt}
33+
width={width}
34+
height={height}
35+
sizes={size}
36+
src={imageUrl}
37+
/>
2738
)}
2839
</div>
2940
)

next.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/** @type {import('next').NextConfig} */
22
const config = {
33
images: {
4-
remotePatterns: [{ hostname: 'cdn.sanity.io' }, { hostname: 'source.unsplash.com' }],
4+
remotePatterns: [
5+
{ hostname: 'cdn.sanity.io' },
6+
{ hostname: 'source.unsplash.com' },
7+
],
58
},
69
typescript: {
710
// Set this to false if you want production builds to abort if there's type errors

npm-shrinkwrap.json

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@
3535
"@sanity/vision": "^3.18.0",
3636
"@tailwindcss/typography": "^0.5.10",
3737
"@vercel/og": "^0.5.17",
38-
"classnames": "^2.3.2",
3938
"clsx": "^2.0.0",
40-
"date-fns": "^2.30.0",
41-
"intl-segmenter-polyfill": "^0.4.4",
4239
"next": "^13.5.4",
4340
"next-sanity": "^5.5.6",
4441
"next-themes": "^0.2.1",

schemas/singletons/home.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default defineType({
1818
}),
1919
defineField({
2020
name: 'overview',
21-
description: 'Used both for the <meta> description tag for SEO, and the personal website subheader.',
21+
description:
22+
'Used both for the <meta> description tag for SEO, and the personal website subheader.',
2223
title: 'Description',
2324
type: 'array',
2425
of: [
@@ -60,7 +61,8 @@ export default defineType({
6061
defineField({
6162
name: 'showcaseProjects',
6263
title: 'Showcase projects',
63-
description: 'These are the projects that will appear first on your landing page.',
64+
description:
65+
'These are the projects that will appear first on your landing page.',
6466
type: 'array',
6567
of: [
6668
defineArrayMember({

schemas/singletons/settings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export default defineType({
3434
}),
3535
defineField({
3636
name: 'footer',
37-
description: 'This is a block of text that will be displayed at the bottom of the page next to the footer.',
37+
description:
38+
'This is a block of text that will be displayed at the bottom of the page next to the footer.',
3839
title: 'Footer Info',
3940
type: 'array',
4041
of: [

0 commit comments

Comments
 (0)