From 40ceb9b3384dccee8739715861f8a0683777b776 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 31 Aug 2023 16:46:01 +0300 Subject: [PATCH] package.json Update to next 13.4.12 (#1576) * Revert "[TEMP]: Drop mxeditor for now (#1574)" This reverts commit 523c866b07826a6401e2e1bfad233f243080daee. * package.json: Update to latest next version Fixes MDXEditor on production builds. Tests: yarn build yarn start Navigating through the pages * Revert "package.json: Update to latest next version" This reverts commit f7c712a8098bc0ad7b531410f6ca7a39136cbfa6. * package.json Update to next 13.4.12 Testing: e2e-passes Translation works MDXEditor works on prod build --- package.json | 2 +- .../common/form/FormRichTextField.tsx | 12 ++- yarn.lock | 94 +++++++++---------- 3 files changed, 55 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index 0fa39d7f2..34f12cc97 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "lodash": "^4.17.21", "mobx": "6.3.2", "mobx-react": "7.2.0", - "next": "^13.1.6", + "next": "13.4.12", "next-auth": "^4.20.1", "next-i18next": "^13.0.0", "nookies": "^2.5.2", diff --git a/src/components/common/form/FormRichTextField.tsx b/src/components/common/form/FormRichTextField.tsx index 226c64d36..37ab353c9 100644 --- a/src/components/common/form/FormRichTextField.tsx +++ b/src/components/common/form/FormRichTextField.tsx @@ -7,7 +7,7 @@ import { translateError } from 'common/form/useForm' import { TranslatableField } from 'common/form/validation' import { styled } from '@mui/material/styles' -// import { ModernEditor } from './MDXEditor' +import { ModernEditor } from './MDXEditor' import { QuillEditor } from './QuillEditor' export type FormRichTextFieldProps = { @@ -33,7 +33,7 @@ export default function FormRichTextField({ name }: FormRichTextFieldProps) { const { t } = useTranslation() const [, meta] = useField(name) const helperText = meta.touched ? translateError(meta.error as TranslatableField, t) : '' - const [useMdxEditor, setUseMdxEditor] = React.useState(false) + const [useMdxEditor, setUseMdxEditor] = React.useState(true) return (
@@ -46,7 +46,7 @@ export default function FormRichTextField({ name }: FormRichTextFieldProps) { {({ field }: { field: FieldInputProps }) => ( - {/* + - */} + {useMdxEditor ? ( - <>{/* */} + <> + + ) : ( )} diff --git a/yarn.lock b/yarn.lock index d9dd8ed6b..6c7c5de8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1968,10 +1968,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.4.9": - version: 13.4.9 - resolution: "@next/env@npm:13.4.9" - checksum: 625f01571ac5dabbb90567a987fdc16eca86cd9cfd592edabf7d3e3024972cd83564d53202293163851b85fa643f846a5757c8696a3c44315c98dae5b634f122 +"@next/env@npm:13.4.12": + version: 13.4.12 + resolution: "@next/env@npm:13.4.12" + checksum: 2ccb2e271b3c42697c1e807cdf988429fcb563f80fa0ca72512f65f47cbbcc46c44fc53bf055814d4b467f1394de8c1a1ef6aad14d35f9993004faa956466d02 languageName: node linkType: hard @@ -1984,65 +1984,65 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-darwin-arm64@npm:13.4.9" +"@next/swc-darwin-arm64@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-darwin-arm64@npm:13.4.12" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-darwin-x64@npm:13.4.9" +"@next/swc-darwin-x64@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-darwin-x64@npm:13.4.12" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-linux-arm64-gnu@npm:13.4.9" +"@next/swc-linux-arm64-gnu@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-linux-arm64-gnu@npm:13.4.12" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-linux-arm64-musl@npm:13.4.9" +"@next/swc-linux-arm64-musl@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-linux-arm64-musl@npm:13.4.12" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-linux-x64-gnu@npm:13.4.9" +"@next/swc-linux-x64-gnu@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-linux-x64-gnu@npm:13.4.12" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-linux-x64-musl@npm:13.4.9" +"@next/swc-linux-x64-musl@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-linux-x64-musl@npm:13.4.12" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-win32-arm64-msvc@npm:13.4.9" +"@next/swc-win32-arm64-msvc@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-win32-arm64-msvc@npm:13.4.12" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-win32-ia32-msvc@npm:13.4.9" +"@next/swc-win32-ia32-msvc@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-win32-ia32-msvc@npm:13.4.12" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.4.9": - version: 13.4.9 - resolution: "@next/swc-win32-x64-msvc@npm:13.4.9" +"@next/swc-win32-x64-msvc@npm:13.4.12": + version: 13.4.12 + resolution: "@next/swc-win32-x64-msvc@npm:13.4.12" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -10608,20 +10608,20 @@ __metadata: languageName: node linkType: hard -"next@npm:^13.1.6": - version: 13.4.9 - resolution: "next@npm:13.4.9" - dependencies: - "@next/env": 13.4.9 - "@next/swc-darwin-arm64": 13.4.9 - "@next/swc-darwin-x64": 13.4.9 - "@next/swc-linux-arm64-gnu": 13.4.9 - "@next/swc-linux-arm64-musl": 13.4.9 - "@next/swc-linux-x64-gnu": 13.4.9 - "@next/swc-linux-x64-musl": 13.4.9 - "@next/swc-win32-arm64-msvc": 13.4.9 - "@next/swc-win32-ia32-msvc": 13.4.9 - "@next/swc-win32-x64-msvc": 13.4.9 +"next@npm:13.4.12": + version: 13.4.12 + resolution: "next@npm:13.4.12" + dependencies: + "@next/env": 13.4.12 + "@next/swc-darwin-arm64": 13.4.12 + "@next/swc-darwin-x64": 13.4.12 + "@next/swc-linux-arm64-gnu": 13.4.12 + "@next/swc-linux-arm64-musl": 13.4.12 + "@next/swc-linux-x64-gnu": 13.4.12 + "@next/swc-linux-x64-musl": 13.4.12 + "@next/swc-win32-arm64-msvc": 13.4.12 + "@next/swc-win32-ia32-msvc": 13.4.12 + "@next/swc-win32-x64-msvc": 13.4.12 "@swc/helpers": 0.5.1 busboy: 1.6.0 caniuse-lite: ^1.0.30001406 @@ -10663,7 +10663,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 7adb9919dc50598e53bf32da2d0f90da325b66a23cb16c291c276d0683f81bade0bb21aeaeede10154ef53eabcb4953bf883f4d752852a62a6bd7be42021aef9 + checksum: 50bd443ffe09424c1a94d6606d41886ccd1d65185e125aa199957ea92c5e4d1c226f1675f3e5ea92e88f43f8355824ba50db52a8aeae225f7a86b6c901d25527 languageName: node linkType: hard @@ -11333,7 +11333,7 @@ __metadata: lodash: ^4.17.21 mobx: 6.3.2 mobx-react: 7.2.0 - next: ^13.1.6 + next: 13.4.12 next-auth: ^4.20.1 next-i18next: ^13.0.0 next-sitemap: ^3.1.52