diff --git a/markdown/dev/tutorials/pattern-design/adding-measurements/en.md b/markdown/dev/tutorials/pattern-design/adding-measurements/en.md
index 05e4df0e87e..2dd90048b09 100644
--- a/markdown/dev/tutorials/pattern-design/adding-measurements/en.md
+++ b/markdown/dev/tutorials/pattern-design/adding-measurements/en.md
@@ -42,7 +42,7 @@ Now everybody knows this part requires the `head` measurement.
This change will also get picked up by the development environment, and you'll now see this screen:
-
+
Since it's just one measurement, let's simply enter a value by hand.
For example `38` as 38cm is a realistic head circumference measurement for a baby.
diff --git a/package.json b/package.json
index 5b7fe8a1732..02ac5abf1fc 100644
--- a/package.json
+++ b/package.json
@@ -95,8 +95,6 @@
"prettier": "^2.7.1",
"pretty-quick": "^3.0.0",
"prop-types": "^15.7.2",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"rehype-format": "^4.0.1",
"remark": "^14.0.2",
"remark-frontmatter": "^4.0.1",
diff --git a/sites/backend/tests/index.mjs b/sites/backend/tests/index.mjs
index 8f3401cfc54..a37c7f6e5fb 100644
--- a/sites/backend/tests/index.mjs
+++ b/sites/backend/tests/index.mjs
@@ -12,7 +12,7 @@ const runTests = async (...params) => {
//await apikeyTests(...params)
//await accountTests(...params)
//await personTests(...params)
- await patternTests(...params)
+ //await patternTests(...params)
}
// Load initial data required for tests
diff --git a/sites/backend/tests/shared.mjs b/sites/backend/tests/shared.mjs
index 9a6b1652a75..0fe5677246d 100644
--- a/sites/backend/tests/shared.mjs
+++ b/sites/backend/tests/shared.mjs
@@ -70,6 +70,7 @@ export const setup = async () => {
console.log('Failed at account confirmation request', err)
process.exit()
}
+ console.log(JSON.stringify(result.data, null ,2))
store[acc].token = result.data.token
store[acc].username = result.data.account.username
store[acc].id = result.data.account.id
diff --git a/sites/dev/components/footer.js b/sites/dev/components/footer.js
index 9f455aaafc9..435b55fa75d 100644
--- a/sites/dev/components/footer.js
+++ b/sites/dev/components/footer.js
@@ -107,19 +107,12 @@ const Footer = ({ app }) => {
{/* Social icons */}
diff --git a/sites/dev/components/layouts/docs.js b/sites/dev/components/layouts/docs.js
index 3c40496a409..a07e1397ad2 100644
--- a/sites/dev/components/layouts/docs.js
+++ b/sites/dev/components/layouts/docs.js
@@ -19,11 +19,7 @@ const DefaultLayout = ({ app, title = false, crumbs = false, children = [] }) =>
slug={slug}
before={[
,
]}
diff --git a/sites/dev/components/navigation/primary.js b/sites/dev/components/navigation/primary.js
index 47411fb0496..a3a9ca56849 100644
--- a/sites/dev/components/navigation/primary.js
+++ b/sites/dev/components/navigation/primary.js
@@ -74,38 +74,37 @@ const SubLevel = ({ nodes = {}, active }) => (
items-center
`}
>
-
-
+
-
- {child.__slug === active ? <>•> : <>°>}
-
-
- {child.__linktitle || child.__title}
-
-
+ {child.__slug === active ? <>•> : <>°>}
+
+
+ {child.__linktitle || child.__title}
+
@@ -114,37 +113,37 @@ const SubLevel = ({ nodes = {}, active }) => (
) : (
-
-
+
-
- {child.__slug === active ? <>•> : <>°>}
-
-
- {child.__linktitle || child.__title}
-
-
+ {child.__slug === active ? <>•> : <>°>}
+
+
+ {child.__linktitle || child.__title}
+
)
@@ -152,56 +151,6 @@ const SubLevel = ({ nodes = {}, active }) => (
)
-// Component that renders a toplevel of navigation
-/*
-const TopLevel = ({ icon, title, nav, current, slug, hasChildren=false, active }) => (
-
-
- {icon}
-
-
- {title}
-
-
- {hasChildren && }
-
- {hasChildren && }
-
-)
-
-const Navigation = ({ app, active, className='' }) => {
- if (!app.navigation) return null
- const output = []
- for (const page of order(app.navigation)) output.push(
°
- }
- title={page.__title}
- slug={page.__slug}
- hasChildren={1}
- nav={app.navigation}
- current={order(app.navigation[page.__slug])}
- active={active}
- />)
-
- return {output}
-}
-*/
export const Icons = ({
app,
ulClasses = '',
@@ -215,11 +164,9 @@ export const Icons = ({
for (const page of order(app.navigation)) {
output.push(
-
-
- {icons[page.__slug] ? icons[page.__slug]('w-14 h-14') : }
- {page.__title}
-
+
+ {icons[page.__slug] ? icons[page.__slug]('w-14 h-14') : }
+ {page.__title}
)
@@ -227,16 +174,7 @@ export const Icons = ({
return
}
-/*
-const PrimaryMenu = ({ app, active, before=[], after=[] }) => (
-
- {before}
-
-
- {after}
-
-)
-*/
+
export const MainSections = ({ app, active }) => {
if (!app.navigation) return null
const output = []
@@ -268,17 +206,16 @@ export const MainSections = ({ app, active }) => {
{txt}
) : (
-
-
- {txt}
-
+
+ {txt}
)}
diff --git a/sites/dev/components/search.js b/sites/dev/components/search.js
index 92a52d05975..7f25d7d55c7 100644
--- a/sites/dev/components/search.js
+++ b/sites/dev/components/search.js
@@ -67,32 +67,26 @@ const Hit = (props) => (
${props.index === props.active ? 'bg-secondary bg-opacity-30' : 'bg-base-300 bg-opacity-10'}
`}
>
-
-
-
- {props.hit._highlightResult?.title ? (
-
- ) : (
- props.hit.title
- )}
-
-
- {props.hit.page.split('/')[1]}
-
-
+
+
+ {props.hit._highlightResult?.title ? (
+
+ ) : (
+ props.hit.title
+ )}
+
+
+ {props.hit.page.split('/')[1]}
+
{props.hit._snippetResult?.body && (
-
-
-
-
+
+
)}
{props.hit?._highlightResult?.page && (
-
-
-
-
+
+
)}
diff --git a/sites/dev/package.json b/sites/dev/package.json
index 23bf6e383b3..a7f3543ebda 100644
--- a/sites/dev/package.json
+++ b/sites/dev/package.json
@@ -25,21 +25,22 @@
"serve": "pm2 start npm --name 'dev' -- run start"
},
"dependencies": {
- "@heroicons/react": "^2.0.1",
- "@mdx-js/loader": "^2.0.0-rc.2",
- "@mdx-js/mdx": "^2.0.0-rc.2",
- "@mdx-js/react": "^2.0.0-rc.2",
- "@mdx-js/runtime": "next",
- "@next/bundle-analyzer": "^13.0.5",
- "@tailwindcss/typography": "^0.5.0",
+ "@heroicons/react": "latest",
+ "@mdx-js/loader": "latest",
+ "@mdx-js/mdx": "latest",
+ "@mdx-js/react": "latest",
+ "@mdx-js/runtime": "latest",
+ "@next/bundle-analyzer": "^13",
+ "@tailwindcss/typography": "latest",
"algoliasearch": "^4.11.0",
"daisyui": "^2.0.6",
"lodash.get": "^4.4.2",
"lodash.orderby": "^4.6.0",
"lodash.set": "^4.3.2",
- "netlify-cli": "^12.0.4",
- "next": "latest",
+ "next": "^13",
+ "react": "^18.2.0",
"react-copy-to-clipboard": "^5.0.4",
+ "react-dom": "^18.2.0",
"react-hotkeys-hook": "^3.4.4",
"react-instantsearch-dom": "^6.18.0",
"react-markdown": "^8.0.3",
diff --git a/sites/lab/components/design-picker.js b/sites/lab/components/design-picker.js
index 8a3bd557e25..dc428ac7589 100644
--- a/sites/lab/components/design-picker.js
+++ b/sites/lab/components/design-picker.js
@@ -48,9 +48,9 @@ const PatternPicker = ({ app }) => {
{sectionPatterns(section).map((pattern) => (
-
+
{pattern}
-
+
))}
diff --git a/sites/lab/components/footer.js b/sites/lab/components/footer.js
index b06e203c28b..d0301d67dd9 100644
--- a/sites/lab/components/footer.js
+++ b/sites/lab/components/footer.js
@@ -110,10 +110,13 @@ const Footer = ({ app }) => {
{/* Social icons */}
diff --git a/sites/lab/package.json b/sites/lab/package.json
index f4a98975291..3f2c5fc0fb8 100644
--- a/sites/lab/package.json
+++ b/sites/lab/package.json
@@ -44,7 +44,6 @@
"lodash.get": "^4.4.2",
"lodash.orderby": "^4.6.0",
"lodash.set": "^4.3.2",
- "netlify-cli": "^12.0.4",
"next": "latest",
"next-i18next": "^12.0.0",
"react-copy-to-clipboard": "^5.0.4",
diff --git a/sites/lab/page-templates/design-list.js b/sites/lab/page-templates/design-list.js
index 73279a2aa25..17fea723ea5 100644
--- a/sites/lab/page-templates/design-list.js
+++ b/sites/lab/page-templates/design-list.js
@@ -5,19 +5,22 @@ import { useTranslation } from 'next-i18next'
import Layout from 'site/components/layouts/bare'
import { PageTitle } from 'shared/components/layouts/default'
-const DesignLinks = ({ list, prefix='' }) => {
+const DesignLinks = ({ list, prefix = '' }) => {
const { t } = useTranslation(['patterns'])
return (
- {list.map( d => (
+ {list.map((d) => (
-
-
- {t(`patterns:${d}.t`)}
-
- {t(`patterns:${d}.d`)}
-
+
+ {t(`patterns:${d}.t`)}
+
+
+ {t(`patterns:${d}.d`)}
+
))}
@@ -25,15 +28,13 @@ const DesignLinks = ({ list, prefix='' }) => {
)
}
-const PatternListPageTemplate = ({ section=false }) => {
+const PatternListPageTemplate = ({ section = false }) => {
const app = useApp()
const { t } = useTranslation(['app'])
- const title = section
- ? app.navigation[section].__title
- : t('designs')
+ const title = section ? app.navigation[section].__title : t('designs')
- const sectionDesigns = (section=false) => {
+ const sectionDesigns = (section = false) => {
if (!section) {
const all = []
for (const section in app.designs) all.push(...app.designs[section])
@@ -47,7 +48,11 @@ const PatternListPageTemplate = ({ section=false }) => {
@@ -56,5 +61,3 @@ const PatternListPageTemplate = ({ section=false }) => {
}
export default PatternListPageTemplate
-
-
diff --git a/sites/org/package.json b/sites/org/package.json
index f02b8fc3abd..bc9258d4d7c 100644
--- a/sites/org/package.json
+++ b/sites/org/package.json
@@ -40,7 +40,6 @@
"lodash.get": "^4.4.2",
"lodash.orderby": "^4.6.0",
"lodash.set": "^4.3.2",
- "netlify-cli": "^12.0.4",
"next": "latest",
"react-hotkeys-hook": "^3.4.4",
"react-instantsearch-dom": "^6.18.0",
diff --git a/sites/shared/components/breadcrumbs.js b/sites/shared/components/breadcrumbs.js
index ebecb704e60..f5034807a04 100644
--- a/sites/shared/components/breadcrumbs.js
+++ b/sites/shared/components/breadcrumbs.js
@@ -6,10 +6,8 @@ const Breadcrumbs = ({ crumbs = [], title }) =>
crumbs ? (
-
-
-
-
+
+
{crumbs.map((crumb) => (
@@ -17,10 +15,12 @@ const Breadcrumbs = ({ crumbs = [], title }) =>
»
{crumb[1] ? (
-
-
- {crumb[0]}
-
+
+ {crumb[0]}
) : (
{crumb[0]}
diff --git a/sites/shared/components/layouts/default.js b/sites/shared/components/layouts/default.js
index 5390cd4ee03..359881d75dc 100644
--- a/sites/shared/components/layouts/default.js
+++ b/sites/shared/components/layouts/default.js
@@ -20,39 +20,38 @@ export const PageTitle = ({ app, slug, title }) => {
return FIXME: This page has no title
}
-const Breadcrumbs = ({ app, slug=false, title }) => {
+const Breadcrumbs = ({ app, slug = false, title }) => {
if (!slug) return null
const crumbs = []
const chunks = slug.split('/')
for (const i in chunks) {
- const j = parseInt(i)+parseInt(1)
- const page = get(app.navigation, chunks.slice(0,j))
- if (page) crumbs.push([page.__linktitle, '/'+chunks.slice(0,j).join('/'), (j < chunks.length)])
+ const j = parseInt(i) + parseInt(1)
+ const page = get(app.navigation, chunks.slice(0, j))
+ if (page) crumbs.push([page.__linktitle, '/' + chunks.slice(0, j).join('/'), j < chunks.length])
}
return (
-
-
-
-
+
+
- {crumbs.map(crumb => (
+ {crumbs.map((crumb) => (
»
- {crumb[2]
- ? (
-
-
- {crumb[0]}
-
-
- )
- : {crumb[0]}
- }
+ {crumb[2] ? (
+
+ {crumb[0]}
+
+ ) : (
+ {crumb[0]}
+ )}
))}
@@ -78,16 +77,15 @@ const asideClasses = `
xl:w-1/4
`
-
const DefaultLayout = ({
app,
- title=false,
- children=[],
+ title = false,
+ children = [],
search,
setSearch,
- noSearch=false,
- workbench=false,
- AltMenu=null,
+ noSearch = false,
+ workbench = false,
+ AltMenu = null,
}) => {
const startNavigation = () => {
app.startLoading()
@@ -105,50 +103,58 @@ const DefaultLayout = ({
const [collapseAltMenu, setCollapseAltMenu] = useState(false)
return (
-
+ `}
+ >
-
-
+ `}
+ >
{workbench && (
setCollapsePrimaryNav(!collapsePrimaryNav)}
>
- {collapsePrimaryNav
- ? <> >
- : <> >
- }
+ {collapsePrimaryNav ? (
+ <>
+
+
+
+ >
+ ) : (
+ <>
+
+
+
+ >
+ )}
)}
-
+
-
+ ${workbench && collapsePrimaryNav ? '' : 'max-w-7xl'}
+ `}
+ >
{title && (
<>
@@ -160,28 +166,35 @@ const DefaultLayout = ({
-
{workbench && AltMenu && (
-
+ ${collapseAltMenu ? 'sm:px-0 sm:w-16' : 'sm:px-1 md:px-4 lg:px-8 sm:w-[38.2%]'}
+ `}
+ >
setCollapseAltMenu(!collapseAltMenu)}
>
- {collapseAltMenu
- ? <> >
- : <> >
- }
+ {collapseAltMenu ? (
+ <>
+
+
+
+ >
+ ) : (
+ <>
+
+
+
+ >
+ )}
{AltMenu}
@@ -190,16 +203,18 @@ const DefaultLayout = ({
{!noSearch && search && (
<>
-
-
-
-
+ `}
+ >
+
+
+
>
)}
diff --git a/sites/shared/components/locale-picker.js b/sites/shared/components/locale-picker.js
index a8def04081d..db7b663c5ec 100644
--- a/sites/shared/components/locale-picker.js
+++ b/sites/shared/components/locale-picker.js
@@ -48,8 +48,12 @@ const LocalePicker = ({ app, iconOnly = false, bottom = false }) => {
{router.locales.map((locale) => (
-
-
{t(locale)}
+
+ {t(locale)}
))}
diff --git a/sites/shared/components/mdx/prev-next.js b/sites/shared/components/mdx/prev-next.js
index 9fd4b07ef74..7c8dbe1c7ee 100644
--- a/sites/shared/components/mdx/prev-next.js
+++ b/sites/shared/components/mdx/prev-next.js
@@ -76,8 +76,8 @@ const renderPrevious = (node) =>
node ? (
) : (
@@ -87,8 +87,8 @@ const renderPrevious = (node) =>
const renderNext = (node) =>
node ? (
diff --git a/sites/shared/components/mdx/read-more.js b/sites/shared/components/mdx/read-more.js
index 10078b0ac3a..3ed7e651a14 100644
--- a/sites/shared/components/mdx/read-more.js
+++ b/sites/shared/components/mdx/read-more.js
@@ -3,26 +3,30 @@ import orderBy from 'lodash.orderby'
import Link from 'next/link'
// Helper method to filter out the real children
-const order = obj => orderBy(obj, ['__order', '__title'], ['asc', 'asc'])
-const currentChildren = current => Object.values(order(current))
- .filter(entry => (typeof entry === 'object'))
+const order = (obj) => orderBy(obj, ['__order', '__title'], ['asc', 'asc'])
+const currentChildren = (current) =>
+ Object.values(order(current)).filter((entry) => typeof entry === 'object')
-const ReadMore = props => {
+const ReadMore = (props) => {
// Don't bother if we don't have the navigation tree in app
if (!props.app) return null
const root = get(props.app.navigation, props.slug.split('/'))
const list = []
for (const page of currentChildren(root)) {
- list.push(
-
- {page.__title}
-
- {props.recurse && }
- )
+ list.push(
+
+
+ {page.__title}
+
+ {props.recurse && }
+
+ )
}
return
}
export default ReadMore
-
diff --git a/sites/shared/components/navigation/primary.js b/sites/shared/components/navigation/primary.js
index 50837c27b34..ca7ce8dbfee 100644
--- a/sites/shared/components/navigation/primary.js
+++ b/sites/shared/components/navigation/primary.js
@@ -13,42 +13,47 @@ import CommunityIcon from 'shared/components/icons/community.js'
import ShowcaseIcon from 'shared/components/icons/camera.js'
// Don't show children for blog and showcase posts
-const keepClosed = ['blog', 'showcase', ]
+const keepClosed = ['blog', 'showcase']
// List of icons matched to top-level slug
const icons = {
- accessories: (className='') =>
,
- account: (className='') => ,
- blocks: (className='') => ,
- blog: (className='') => ,
- community: (className='') => ,
- designs: (className='') => ,
- docs: (className='') => ,
- garments: (className='') => ,
- guides: (className='') => ,
- howtos: (className='') => ,
- reference: (className='') => ,
- showcase: (className='') => ,
- tutorials: (className='') => ,
- utilities: (className='') => ,
+ accessories: (className = '') => ,
+ account: (className = '') => ,
+ blocks: (className = '') => ,
+ blog: (className = '') => ,
+ community: (className = '') => ,
+ designs: (className = '') => ,
+ docs: (className = '') => ,
+ garments: (className = '') => ,
+ guides: (className = '') => ,
+ howtos: (className = '') => ,
+ reference: (className = '') => ,
+ showcase: (className = '') => ,
+ tutorials: (className = '') => ,
+ utilities: (className = '') => ,
}
/* helper method to order nav entries */
-const order = obj => orderBy(obj, ['__order', '__title'], ['asc', 'asc'])
+const order = (obj) => orderBy(obj, ['__order', '__title'], ['asc', 'asc'])
// Component for the collapse toggle
// Exported for re-use
-export const Chevron = ({w=8, m=2}) => (
+
-
-
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 20 20"
+ >
+
+
+)
// Helper method to filter out the real children
-const currentChildren = current => Object.values(order(current))
- .filter(entry => (typeof entry === 'object'))
+const currentChildren = (current) =>
+ Object.values(order(current)).filter((entry) => typeof entry === 'object')
// Shared classes for links
// Exported for re-use
@@ -73,157 +78,175 @@ const isActive = (slug, active) => {
}
// Component that renders a sublevel of navigation
-const SubLevel = ({ nodes={}, active }) => (
+const SubLevel = ({ nodes = {}, active }) => (
)
// Component that renders a toplevel of navigation
-const TopLevel = ({ icon, title, nav, current, slug, hasChildren=false, active }) => (
-
- (
+
+
+ `}
+ >
{icon}
-
-
- {title}
-
+ ${slug === active ? 'text-secondary sm:text-secondary' : ''}`}
+ >
+ {title}
- {hasChildren && }
+ {hasChildren && }
{hasChildren && }
)
-const Navigation = ({ app, active, className='' }) => {
+const Navigation = ({ app, active, className = '' }) => {
if (!app.navigation) return null
const output = []
- for (const page of order(app.navigation)) output.push(°
- }
- title={page.__title}
- slug={page.__slug}
- hasChildren={keepClosed.indexOf(page.__slug) === -1}
- nav={app.navigation}
- current={order(app.navigation[page.__slug])}
- active={active}
- />)
+ for (const page of order(app.navigation))
+ output.push(
+ °
+ )
+ }
+ title={page.__title}
+ slug={page.__slug}
+ hasChildren={keepClosed.indexOf(page.__slug) === -1}
+ nav={app.navigation}
+ current={order(app.navigation[page.__slug])}
+ active={active}
+ />
+ )
return {output}
}
export const Icons = ({
- app, active,
- ulClasses='',
- liClasses='',
- linkClasses=`grow text-lg lg:text-xl py-1 text-base-content sm:text-base-content
+ app,
+ active,
+ ulClasses = '',
+ liClasses = '',
+ linkClasses = `grow text-lg lg:text-xl py-1 text-base-content sm:text-base-content
hover:text-secondary sm:hover:text-secondary hover:cursor-pointer
flex flex-col items-center`,
- linkStyle={}
+ linkStyle = {},
}) => {
if (!app.navigation) return null
const output = []
for (const page of order(app.navigation)) {
output.push(
-
-
- {icons[page.__slug]
- ? icons[page.__slug]('w-14 h-14')
- :
- }
- {page.__title}
-
+
+
+ {icons[page.__slug] ? icons[page.__slug]('w-14 h-14') : }
+ {page.__title}
+
)
@@ -232,11 +255,11 @@ export const Icons = ({
return
}
-const PrimaryMenu = ({ app, active, before=[], after=[] }) => (
+const PrimaryMenu = ({ app, active, before = [], after = [] }) => (
{before}
-
-
+
+
{after}
)
diff --git a/sites/shared/components/page-link.js b/sites/shared/components/page-link.js
index 516886f1a26..ec5fd9b3f08 100644
--- a/sites/shared/components/page-link.js
+++ b/sites/shared/components/page-link.js
@@ -1,12 +1,13 @@
import Link from 'next/link'
-const PageLink = ({ href, txt, className="" }) => (
-
- {txt}
+const PageLink = ({ href, txt, className = '' }) => (
+
+ {txt}
)
export default PageLink
-
diff --git a/sites/shared/components/picker.js b/sites/shared/components/picker.js
index bfba5c33335..6f66ca4aec2 100644
--- a/sites/shared/components/picker.js
+++ b/sites/shared/components/picker.js
@@ -1,28 +1,38 @@
-import {forwardRef} from 'react'
+import { forwardRef } from 'react'
import { Menu } from '@headlessui/react'
import Link from 'next/link'
/** an accessible dropdown menu for use by picker components */
-export const Picker = ({Icon, className, title, ariaLabel, iconOnly=false, children, end}) => {
-
- return (
- {
+ return (
+
+
-
- {!iconOnly && {title} }
-
-
- {children}
-
- )
+ `
+ }
+ aria-label={ariaLabel}
+ >
+
+ {!iconOnly && {title} }
+
+
+ {children}
+
+
+ )
}
/** get the menu item's class based on whether it's active */
-const itemClass = (active) => "btn btn-ghost " + (active ? 'bg-base-200' : '')
+const itemClass = (active) => 'btn btn-ghost ' + (active ? 'bg-base-200' : '')
/**
* a menu item that has a link in it
@@ -32,34 +42,39 @@ const itemClass = (active) => "btn btn-ghost " + (active ? 'bg-base-200' : '')
** locale?: the locale the link links to
* */
export const PickerLink = (props) => {
- return (
-
- {({active}) => ( )}
-
- )
+ return (
+
+
+ {({ active }) => }
+
+
+ )
}
/**
* Necessary to have keyboard enter 'click' events passed to the link */
-const ForwardLink = forwardRef(({href, locale, active, children, ...rest}, ref) => (
-
-
-
- {children}
-
-
-
+const ForwardLink = forwardRef(({ href, locale, active, children, ...rest }, ref) => (
+
+ {children}
+
))
/** a menu item that is a button */
-export const PickerButton = ({onClick, children}) => {
- return (
- {({ active }) => (
-
-
- {children}
-
-
- )}
- )
+export const PickerButton = ({ onClick, children }) => {
+ return (
+
+ {({ active }) => (
+
+ {children}
+
+ )}
+
+ )
}
diff --git a/sites/shared/components/wordmark.js b/sites/shared/components/wordmark.js
index fe93e9351e4..ba99f9bbca7 100644
--- a/sites/shared/components/wordmark.js
+++ b/sites/shared/components/wordmark.js
@@ -16,12 +16,11 @@ export const InnerWordMark = () => (
)
export const WordMark = () => (
-
-
-
-
+
+
)
diff --git a/sites/shared/components/worm.js b/sites/shared/components/worm.js
index 1d97703588c..8bbc6eca1df 100644
--- a/sites/shared/components/worm.js
+++ b/sites/shared/components/worm.js
@@ -25,7 +25,7 @@ const PreviewTile = ({ img, slug, title, href=false, fixed=false }) => (
>
{href
?
- :
+ :
}
)
diff --git a/sites/shared/components/wrappers/mdx.js b/sites/shared/components/wrappers/mdx.js
index 91432957e4d..15ac523b4fc 100644
--- a/sites/shared/components/wrappers/mdx.js
+++ b/sites/shared/components/wrappers/mdx.js
@@ -7,7 +7,7 @@ import { useState, useEffect } from 'react'
// See: https://mdxjs.com/guides/mdx-on-demand/
import { run } from '@mdx-js/mdx'
-import * as runtime from 'react/jsx-runtime.js'
+import * as runtime from 'react/jsx-runtime'
// Components that are available in all MDX
import customComponents from 'shared/components/mdx'
@@ -17,8 +17,7 @@ import PrevNext from '../mdx/prev-next'
const Null = (props) => null
-const MdxWrapper = ({mdx, app, t, components={}}) => {
-
+const MdxWrapper = ({ mdx, app, t, components = {} }) => {
const [mdxModule, setMdxModule] = useState()
useEffect(() => {
@@ -34,20 +33,20 @@ const MdxWrapper = ({mdx, app, t, components={}}) => {
*/
const allComponents = {
...customComponents(app, t),
- ...components
+ ...components,
}
// React component for MDX content
const MdxContent = mdxModule ? mdxModule.default : Null
- return app
- ? (
-
- ) :
+ return app ? (
+
+ ) : (
+
+ )
}
export default MdxWrapper
-
diff --git a/sites/shared/components/wrappers/toc.js b/sites/shared/components/wrappers/toc.js
index dc29f443c59..94bc2b32979 100644
--- a/sites/shared/components/wrappers/toc.js
+++ b/sites/shared/components/wrappers/toc.js
@@ -7,7 +7,7 @@ import { useState, useEffect, Fragment } from 'react'
// See: https://mdxjs.com/guides/mdx-on-demand/
import { run } from '@mdx-js/mdx'
-import * as runtime from 'react/jsx-runtime.js'
+import * as runtime from 'react/jsx-runtime'
const TocWrapper = ({ toc, app }) => {
const [mdxModule, setMdxModule] = useState()
diff --git a/sites/shared/package.json b/sites/shared/package.json
index 9a5a3207e7c..5ff97582187 100644
--- a/sites/shared/package.json
+++ b/sites/shared/package.json
@@ -43,6 +43,8 @@
"mdast-util-toc": "^6.1.0",
"pdfkit": "^0.13.0",
"postcss-for": "^2.1.1",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
"react-markdown": "^8.0.0",
"react-sizeme": "^3.0.2",
"react-timeago": "^7.1.0",