Skip to content

Commit deeeb7c

Browse files
fix: [PLATO-338] mui icons
- Fixing an issue with mui/material-icons breaking Netlify's deploy opennextjs/opennextjs-netlify#1174 (comment) - Made some small changes to the image component, making the alt property more intuitive - Fixed some faulty notFound returns in our slug page - Hard locked the current Next version - Updated our Node version to 18
1 parent 3bb6983 commit deeeb7c

File tree

9 files changed

+14
-16
lines changed

9 files changed

+14
-16
lines changed

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.18.1
1+
v18.12.1

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"version": "0.0.1",
66
"engines": {
7-
"node": "16.18.1",
7+
"node": "18.12.1",
88
"npm": "Please use Yarn"
99
},
1010
"scripts": {
@@ -48,7 +48,7 @@
4848
"graphql": "^16.5.0",
4949
"intersection-observer": "^0.12.2",
5050
"lodash": "^4.17.21",
51-
"next": "^12.3.1",
51+
"next": "12.3.1",
5252
"next-compose-plugins": "^2.2.1",
5353
"next-i18next": "^12.0.1",
5454
"next-pwa": "^5.6.0",

src/components/features/ctf-components/ctf-asset/ctf-asset.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const CtfAsset = (props: CtfAssetPropsInterface) => {
2727
<CtfImage
2828
height={height || undefined}
2929
width={width || undefined}
30-
title={title || ''}
30+
alt={title || ''}
3131
src={url}
3232
showDescription={
3333
['quote', 'product-table', 'info-block', 'duplex'].includes(layout.parent) === true

src/components/features/ctf-components/ctf-duplex/ctf-duplex.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const DuplexImage = (props: DuplexFieldsFragment) => {
139139
<CtfImage
140140
className={clsx([classes.image, imageStyle === 'fixed' && classes.imageFull])}
141141
src={`${image.url}?w=600`}
142-
title={image.description || ''}
142+
alt={image.description || ''}
143143
layout="responsive"
144144
width={image.width || undefined}
145145
height={image.height || undefined}

src/components/features/ctf-components/ctf-footer/ctf-footer.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { Twitter, Facebook, LinkedIn, Instagram } from '@mui/icons-material';
1+
import Facebook from '@mui/icons-material/Facebook';
2+
import Instagram from '@mui/icons-material/Instagram';
3+
import LinkedIn from '@mui/icons-material/LinkedIn';
4+
import Twitter from '@mui/icons-material/Twitter';
25
import { Theme, Container, Typography } from '@mui/material';
36
import { makeStyles } from '@mui/styles';
47
import { useTranslation } from 'next-i18next';
@@ -154,6 +157,7 @@ const useStyles = makeStyles((theme: Theme) => ({
154157
},
155158
legalMenuItem: {
156159
fontSize: '2rem',
160+
marginTop: theme.spacing(2),
157161
width: '100%',
158162
[theme.breakpoints.up('md')]: {
159163
marginTop: 0,

src/components/features/ctf-components/ctf-image/ctf-image.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const CtfImage = ({
1111
src,
1212
description,
1313
showDescription = true,
14-
title = '',
1514
width,
1615
height,
1716
layout,
@@ -39,7 +38,6 @@ export const CtfImage = ({
3938
setLoaded(true);
4039
}}
4140
src={src}
42-
alt={title}
4341
width={width}
4442
height={height}
4543
layout={layout}

src/components/templates/header/header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Menu } from '@mui/icons-material';
1+
import Menu from '@mui/icons-material/Menu';
22
import { AppBar, Container, IconButton, Theme, Toolbar, Box } from '@mui/material';
33
import { makeStyles } from '@mui/styles';
44
import { useTranslation } from 'next-i18next';

src/pages/[slug].tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,14 @@ export const getServerSideProps = async ({ locale, params }: CustomNextPageConte
6464

6565
if (!__typename)
6666
return {
67-
props: {
68-
notFound: true,
69-
},
67+
notFound: true,
7068
};
7169

7270
const query = prefetchMap?.[__typename];
7371

7472
if (!query)
7573
return {
76-
props: {
77-
notFound: true,
78-
},
74+
notFound: true,
7975
};
8076

8177
const data: PrefetchMappingTypeFetcher = await query.fetcher({

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -6454,7 +6454,7 @@ next-pwa@^5.6.0:
64546454
workbox-webpack-plugin "^6.5.4"
64556455
workbox-window "^6.5.4"
64566456

6457-
next@^12.3.1:
6457+
64586458
version "12.3.1"
64596459
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
64606460
integrity sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==

0 commit comments

Comments
 (0)