-
+
-
+
{t('cc')}
@@ -138,7 +139,7 @@ export const Footer = ({ app }) => {
{/* Col 3 - Logo & Slogan */}
-
+
diff --git a/sites/org/components/gdpr/details.js b/sites/org/components/gdpr/details.mjs
similarity index 100%
rename from sites/org/components/gdpr/details.js
rename to sites/org/components/gdpr/details.mjs
diff --git a/sites/org/components/header/index.mjs b/sites/org/components/header/index.mjs
index c10e543d646..70597fcbe87 100644
--- a/sites/org/components/header/index.mjs
+++ b/sites/org/components/header/index.mjs
@@ -1,11 +1,9 @@
import { useState, useEffect } from 'react'
-import ThemePicker, { ns as themeNs } from 'shared/components/theme-picker/index.js'
-import LocalePicker, { ns as localeNs } from 'shared/components/locale-picker/index.js'
-import CloseIcon from 'shared/components/icons/close.js'
-import MenuIcon from 'shared/components/icons/menu.js'
-import SearchIcon from 'shared/components/icons/search.js'
-import Ribbon from 'shared/components/ribbon.js'
-import { WordMark } from 'shared/components/wordmark.js'
+import { ThemePicker, ns as themeNs } from 'shared/components/theme-picker/index.mjs'
+import { LocalePicker, ns as localeNs } from 'shared/components/locale-picker/index.mjs'
+import { CloseIcon, MenuIcon, SearchIcon } from 'shared/components/icons.mjs'
+import { Ribbon } from 'shared/components/ribbon.mjs'
+import { WordMark } from 'shared/components/wordmark.mjs'
export const ns = [...new Set([...themeNs, ...localeNs])]
diff --git a/sites/org/components/help-us.js b/sites/org/components/help-us.mjs
similarity index 100%
rename from sites/org/components/help-us.js
rename to sites/org/components/help-us.mjs
diff --git a/sites/org/components/layouts/bare.js b/sites/org/components/layouts/bare.js
deleted file mode 100644
index b46e4fe6774..00000000000
--- a/sites/org/components/layouts/bare.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { useRouter } from 'next/router'
-import Aside from 'shared/components/navigation/aside'
-import ThemePicker from 'shared/components/theme-picker'
-
-const DefaultLayout = ({ app, children = [] }) => {
- const router = useRouter()
- const slug = router.asPath.slice(1)
-
- return (
- <>
-
} mobileOnly />
- {children}
- >
- )
-}
-
-export default DefaultLayout
diff --git a/sites/org/components/layouts/bare.mjs b/sites/org/components/layouts/bare.mjs
new file mode 100644
index 00000000000..044d73e4408
--- /dev/null
+++ b/sites/org/components/layouts/bare.mjs
@@ -0,0 +1,15 @@
+import { useRouter } from 'next/router'
+import { AsideNavigation } from 'shared/components/navigation/aside.mjs'
+import { ThemePicker } from 'shared/components/theme-picker/index.mjs'
+
+export const BareLayout = ({ app, children = [] }) => {
+ const router = useRouter()
+ const slug = router.asPath.slice(1)
+
+ return (
+ <>
+
} mobileOnly />
+ {children}
+ >
+ )
+}
diff --git a/sites/org/components/layouts/docs.js b/sites/org/components/layouts/docs.mjs
similarity index 76%
rename from sites/org/components/layouts/docs.js
rename to sites/org/components/layouts/docs.mjs
index 1a3a1b2c539..7c9f4e576c9 100644
--- a/sites/org/components/layouts/docs.js
+++ b/sites/org/components/layouts/docs.mjs
@@ -1,7 +1,7 @@
import { useRouter } from 'next/router'
-import Aside from 'site/components/navigation/aside'
+import { AsideNavigation } from 'site/components/navigation/aside.mjs'
-const DefaultLayout = ({ app, title = false, children = [] }) => {
+export const DocsLayout = ({ app, title = false, children = [] }) => {
const router = useRouter()
const slug = router.asPath.slice(1)
@@ -18,7 +18,7 @@ const DefaultLayout = ({ app, title = false, children = [] }) => {
lg:block
`}
>
-
+
@@ -29,5 +29,3 @@ const DefaultLayout = ({ app, title = false, children = [] }) => {
)
}
-
-export default DefaultLayout
diff --git a/sites/org/components/mdx/index.js b/sites/org/components/mdx/index.mjs
similarity index 82%
rename from sites/org/components/mdx/index.js
rename to sites/org/components/mdx/index.mjs
index df9d61e6699..d7a31ccaab5 100644
--- a/sites/org/components/mdx/index.js
+++ b/sites/org/components/mdx/index.mjs
@@ -2,10 +2,8 @@
//import PatternOptions from './pattern-options.js'
//import PatternMeasurements from './pattern-measurements.js'
-const components = {
+export const components = {
//PatternDocs,
//PatternOptions,
//PatternMeasurements,
}
-
-export default components
diff --git a/sites/org/components/mdx/pattern-docs.js b/sites/org/components/mdx/pattern-docs.mjs
similarity index 100%
rename from sites/org/components/mdx/pattern-docs.js
rename to sites/org/components/mdx/pattern-docs.mjs
diff --git a/sites/org/components/mdx/pattern-measurements.js b/sites/org/components/mdx/pattern-measurements.mjs
similarity index 83%
rename from sites/org/components/mdx/pattern-measurements.js
rename to sites/org/components/mdx/pattern-measurements.mjs
index 1a6d4623c78..5e7fbb9ffce 100644
--- a/sites/org/components/mdx/pattern-measurements.js
+++ b/sites/org/components/mdx/pattern-measurements.mjs
@@ -3,21 +3,21 @@ import { useTranslation } from 'next-i18next'
import orderBy from 'lodash.orderby'
import PageLink from 'shared/components/page-link.js'
-const PatternMeasurements = ({ pattern, before=null, after=null }) => {
+const PatternMeasurements = ({ pattern, before = null, after = null }) => {
const { t } = useTranslation(['measurements'])
const measurements = {}
for (const m of configs[pattern].measurements) {
measurements[m] = {
title: t(`measurements.${m}`),
- required: true
+ required: true,
}
}
for (const m of configs[pattern].measurements || []) {
measurements[m] = {
name: m,
title: t(`measurements:${m}`),
- required: false
+ required: false,
}
}
@@ -28,7 +28,7 @@ const PatternMeasurements = ({ pattern, before=null, after=null }) => {
{before}
- {orderBy(measurements, ['title'], ['asc']).map(m => (
+ {orderBy(measurements, ['title'], ['asc']).map((m) => (
-
diff --git a/sites/org/components/mdx/pattern-options.js b/sites/org/components/mdx/pattern-options.mjs
similarity index 96%
rename from sites/org/components/mdx/pattern-options.js
rename to sites/org/components/mdx/pattern-options.mjs
index 5e9b753178d..1dc57be12f0 100644
--- a/sites/org/components/mdx/pattern-options.js
+++ b/sites/org/components/mdx/pattern-options.mjs
@@ -49,7 +49,7 @@ const renderOptions = (groups, pattern, t) => {
return
}
-const PatternOptions = ({ pattern, before=null, after=null }) => {
+const PatternOptions = ({ pattern, before = null, after = null }) => {
const { t } = useTranslation([`o_${pattern}`, 'og'])
return (
diff --git a/sites/org/components/navigation/aside.js b/sites/org/components/navigation/aside.mjs
similarity index 78%
rename from sites/org/components/navigation/aside.js
rename to sites/org/components/navigation/aside.mjs
index dd23f8a81ef..172f57d2a6a 100644
--- a/sites/org/components/navigation/aside.js
+++ b/sites/org/components/navigation/aside.mjs
@@ -1,6 +1,6 @@
-import PrimaryNavigation from './primary'
+import { PrimaryNavigation } from './primary.mjs'
-const Aside = ({ app, slug, mobileOnly = false, before = [], after = [] }) => (
+export const AsideNavigation = ({ app, slug, mobileOnly = false, before = [], after = [] }) => (
)
-
-export default Aside
diff --git a/sites/org/components/navigation/primary.js b/sites/org/components/navigation/primary.mjs
similarity index 97%
rename from sites/org/components/navigation/primary.js
rename to sites/org/components/navigation/primary.mjs
index 1d496ec60ae..5600e5bdefd 100644
--- a/sites/org/components/navigation/primary.js
+++ b/sites/org/components/navigation/primary.mjs
@@ -1,8 +1,8 @@
import { useState, useEffect } from 'react'
import Link from 'next/link'
import orderBy from 'lodash.orderby'
-import FreeSewingIcon from 'shared/components/icons/freesewing.js'
-import TopLevel from './top-level.js'
+import { FreeSewingIcon } from 'shared/components/icons.mjs'
+import { TopLevelNavigation as TopLevel } from './top-level.mjs'
/* helper method to order nav entries */
const order = (obj) => orderBy(obj, ['__order', '__title'], ['asc', 'asc'])
@@ -278,12 +278,10 @@ const Navigation = ({ app, active, className = '' }) => {
return {output}
}
-const PrimaryMenu = ({ app, active, before = [], after = [] }) => (
+export const PrimaryNavigation = ({ app, active, before = [], after = [] }) => (
)
-
-export default PrimaryMenu
diff --git a/sites/org/components/navigation/top-level.js b/sites/org/components/navigation/top-level.js
deleted file mode 100644
index 66e99638ab8..00000000000
--- a/sites/org/components/navigation/top-level.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const TopLevelNavigation = () => {
- return Top-level menu here
-}
-
-export default TopLevelNavigation
diff --git a/sites/org/components/navigation/top-level.mjs b/sites/org/components/navigation/top-level.mjs
new file mode 100644
index 00000000000..af078490c94
--- /dev/null
+++ b/sites/org/components/navigation/top-level.mjs
@@ -0,0 +1,3 @@
+export const TopLevelNavigation = () => {
+ return Top-level menu here
+}
diff --git a/sites/org/components/search.js b/sites/org/components/search.mjs
similarity index 99%
rename from sites/org/components/search.js
rename to sites/org/components/search.mjs
index 194861a7e8c..81af61e5b7c 100644
--- a/sites/org/components/search.js
+++ b/sites/org/components/search.mjs
@@ -10,7 +10,7 @@ import {
connectHighlight,
connectSearchBox,
} from 'react-instantsearch-dom'
-import { freeSewingConfig } from 'site/freesewing.config.js'
+import { freeSewingConfig } from 'site/freesewing.config.mjs'
const searchClient = algoliasearch(freeSewingConfig.algolia.app, freeSewingConfig.algolia.key)
diff --git a/sites/org/components/wrappers/auth/index.js b/sites/org/components/wrappers/auth/index.mjs
similarity index 95%
rename from sites/org/components/wrappers/auth/index.js
rename to sites/org/components/wrappers/auth/index.mjs
index e9e38489a01..1b3390a7c57 100644
--- a/sites/org/components/wrappers/auth/index.js
+++ b/sites/org/components/wrappers/auth/index.mjs
@@ -1,6 +1,6 @@
import Link from 'next/link'
import { useTranslation } from 'next-i18next'
-import Loader from 'shared/components/loader.js'
+import { Loader } from 'shared/components/loader.mjs'
export const ns = ['auth']
@@ -83,7 +83,7 @@ const ConsentLacking = ({ t }) => (
)
-const AuthWrapper = ({ children, app }) => {
+export const AuthWrapper = ({ children, app }) => {
const { t } = useTranslation(ns)
if (!app.accountReady) return
if (!app.token || !app.account?.username) return
@@ -97,5 +97,3 @@ const AuthWrapper = ({ children, app }) => {
return children
}
-
-export default AuthWrapper
diff --git a/sites/org/components/wrappers/layout.js b/sites/org/components/wrappers/layout.mjs
similarity index 87%
rename from sites/org/components/wrappers/layout.js
rename to sites/org/components/wrappers/layout.mjs
index f44628cbb45..7cfd2087905 100644
--- a/sites/org/components/wrappers/layout.js
+++ b/sites/org/components/wrappers/layout.mjs
@@ -1,11 +1,20 @@
+// Hooks
import { useRouter } from 'next/router'
+// Components
import { Header, ns as headerNs } from 'site/components/header/index.mjs'
import { Footer, ns as footerNs } from 'site/components/footer/index.mjs'
-import { Search, ns as searchNs } from 'site/components/search'
+import { Search, ns as searchNs } from 'site/components/search.mjs'
export const ns = [...new Set([...headerNs, ...footerNs, ...searchNs])]
-const LayoutWrapper = ({ app, children = [], footer, search, setSearch, noSearch = false }) => {
+export const LayoutWrapper = ({
+ app,
+ children = [],
+ footer,
+ search,
+ setSearch,
+ noSearch = false,
+}) => {
const startNavigation = () => {
app.startLoading()
// Force close of menu on mobile if it is open
@@ -48,5 +57,3 @@ const LayoutWrapper = ({ app, children = [], footer, search, setSearch, noSearch
)
}
-
-export default LayoutWrapper
diff --git a/sites/org/components/wrappers/page.js b/sites/org/components/wrappers/page.mjs
similarity index 85%
rename from sites/org/components/wrappers/page.js
rename to sites/org/components/wrappers/page.mjs
index 9a3a0cca204..221b617cb12 100644
--- a/sites/org/components/wrappers/page.js
+++ b/sites/org/components/wrappers/page.mjs
@@ -1,19 +1,20 @@
+// Hooks
import React, { useState, useEffect } from 'react'
import { useSwipeable } from 'react-swipeable'
import { useRouter } from 'next/router'
import { useHotkeys } from 'react-hotkeys-hook'
-// Layouts components
-import LayoutWrapper from 'site/components/wrappers/layout'
-import Docs from 'site/components/layouts/docs'
+// Components
+import { LayoutWrapper } from 'site/components/wrappers/layout.mjs'
+import { DocsLayout } from 'site/components/layouts/docs.mjs'
// Add feeds
-import Feeds from 'site/components/feeds.js'
+import { Feeds } from 'site/components/feeds.mjs'
/* This component should wrap all page content */
-const PageWrapper = ({
+export const PageWrapper = ({
title = 'FIXME: No title set',
noSearch = false,
app = false,
- layout = Docs,
+ layout = DocsLayout,
footer = true,
crumbs = false,
children = [],
@@ -64,5 +65,3 @@ const PageWrapper = ({
)
}
-
-export default PageWrapper
diff --git a/sites/org/components/wrappers/susi.js b/sites/org/components/wrappers/susi.mjs
similarity index 88%
rename from sites/org/components/wrappers/susi.js
rename to sites/org/components/wrappers/susi.mjs
index b93b4ce1405..370546ca3ec 100644
--- a/sites/org/components/wrappers/susi.js
+++ b/sites/org/components/wrappers/susi.mjs
@@ -5,7 +5,7 @@ const opacity = {
lgbtq: 80,
}
-const SusiWrapper = ({ theme, children, error = false }) => (
+export const SusiWrapper = ({ theme, children, error = false }) => (
)
-
-export default SusiWrapper
diff --git a/sites/org/components/wrappers/welcome.js b/sites/org/components/wrappers/welcome.mjs
similarity index 75%
rename from sites/org/components/wrappers/welcome.js
rename to sites/org/components/wrappers/welcome.mjs
index 3d6e1e6f5d7..23c331d9286 100644
--- a/sites/org/components/wrappers/welcome.js
+++ b/sites/org/components/wrappers/welcome.mjs
@@ -1,9 +1,7 @@
-const WelcomeWrapper = ({ children }) => (
+export const WelcomeWrapper = ({ children }) => (
)
-
-export default WelcomeWrapper
diff --git a/sites/org/freesewing.config.js b/sites/org/freesewing.config.mjs
similarity index 100%
rename from sites/org/freesewing.config.js
rename to sites/org/freesewing.config.mjs
diff --git a/sites/org/hooks/useApp.js b/sites/org/hooks/useApp.mjs
similarity index 98%
rename from sites/org/hooks/useApp.js
rename to sites/org/hooks/useApp.mjs
index c6b559a1b29..b7cebef0ede 100644
--- a/sites/org/hooks/useApp.js
+++ b/sites/org/hooks/useApp.mjs
@@ -80,7 +80,7 @@ const buildNavigation = (lang, t) => {
/*
* The actual hook
*/
-function useApp({ bugsnag }) {
+export function useApp({ bugsnag }) {
// Load translation method
const locale = useRouter().locale
const { t } = useTranslation()
@@ -183,5 +183,3 @@ function useApp({ bugsnag }) {
errId,
}
}
-
-export default useApp
diff --git a/sites/org/hooks/useBackend.js b/sites/org/hooks/useBackend.mjs
similarity index 97%
rename from sites/org/hooks/useBackend.js
rename to sites/org/hooks/useBackend.mjs
index 21d543b176b..2f1f29301d8 100644
--- a/sites/org/hooks/useBackend.js
+++ b/sites/org/hooks/useBackend.mjs
@@ -9,7 +9,7 @@ const api = axios.create({
timeout: 3000,
})
-function useBackend(app) {
+export function useBackend(app) {
const auth = {
headers: { Authorization: 'Bearer ' + app.token },
}
@@ -107,5 +107,3 @@ function useBackend(app) {
return backend
}
-
-export default useBackend
diff --git a/sites/org/notes.md b/sites/org/notes.md
new file mode 100644
index 00000000000..ec48f879c4b
--- /dev/null
+++ b/sites/org/notes.md
@@ -0,0 +1,3 @@
+to sit
+bu hao yi se
+
diff --git a/sites/org/pages/_app.js b/sites/org/pages/_app.mjs
similarity index 90%
rename from sites/org/pages/_app.js
rename to sites/org/pages/_app.mjs
index 261ae28a4c7..eea99e4dcd2 100644
--- a/sites/org/pages/_app.js
+++ b/sites/org/pages/_app.mjs
@@ -3,7 +3,7 @@ import { appWithTranslation } from 'next-i18next'
import React from 'react'
import Bugsnag from '@bugsnag/js'
import BugsnagPluginReact from '@bugsnag/plugin-react'
-import { freeSewingConfig } from 'site/freesewing.config.js'
+import { freeSewingConfig } from 'site/freesewing.config.mjs'
Bugsnag.start({
apiKey: freeSewingConfig.bugsnag.key,
diff --git a/sites/org/pages/confirm/signup/[...confirmation].js b/sites/org/pages/confirm/signup/[...confirmation].mjs
similarity index 89%
rename from sites/org/pages/confirm/signup/[...confirmation].js
rename to sites/org/pages/confirm/signup/[...confirmation].mjs
index e645ff1fd27..9d0c458fdb7 100644
--- a/sites/org/pages/confirm/signup/[...confirmation].js
+++ b/sites/org/pages/confirm/signup/[...confirmation].mjs
@@ -1,22 +1,24 @@
-import { useEffect } from 'react'
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import useBackend from 'site/hooks/useBackend.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
-import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import Link from 'next/link'
-import { useState } from 'react'
-import WelcomeWrapper from 'site/components/wrappers/welcome.js'
-import Spinner from 'shared/components/icons/spinner.js'
+// Hooks
+import { useEffect, useState } from 'react'
+import { useApp } from 'site/hooks/useApp.mjs'
+import { useBackend } from 'site/hooks/useBackend.mjs'
import { useRouter } from 'next/router'
-import Popout from 'shared/components/popout.js'
+import { useTranslation } from 'next-i18next'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+import Link from 'next/link'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { WelcomeWrapper } from 'site/components/wrappers/welcome.mjs'
+import { Spinner } from 'shared/components/spinner.mjs'
+import { Popout } from 'shared/components/popout.mjs'
+import { Robot } from 'shared/components/robot/index.mjs'
import {
GdprProfileDetails,
GdprMeasurementsDetails,
ns as gdprNs,
-} from 'site/components/gdpr/details.js'
-import Robot from 'shared/components/robot/index.js'
+} from 'site/components/gdpr/details.mjs'
// Translation namespaces used on this page
const ns = Array.from(new Set([...gdprNs, 'confirm', 'locales', 'themes']))
@@ -110,11 +112,11 @@ const ConfirmSignUpPage = (props) => {
// Short-circuit errors
if (error)
return (
-
+
-
+
)
const partA = (
@@ -181,7 +183,7 @@ const ConfirmSignUpPage = (props) => {
)
return (
-
+
{ready ? (
<>
@@ -223,7 +225,7 @@ const ConfirmSignUpPage = (props) => {
-
+
)
}
diff --git a/sites/org/pages/docs/[...mdxslug].js b/sites/org/pages/docs/[...mdxslug].mjs
similarity index 88%
rename from sites/org/pages/docs/[...mdxslug].js
rename to sites/org/pages/docs/[...mdxslug].mjs
index 9cb6447b477..8f602581448 100644
--- a/sites/org/pages/docs/[...mdxslug].js
+++ b/sites/org/pages/docs/[...mdxslug].mjs
@@ -1,14 +1,16 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import mdxLoader from 'shared/mdx/loader'
-import MdxWrapper from 'shared/components/wrappers/mdx'
-import TocWrapper from 'shared/components/wrappers/toc'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
+// Dependencies
import Head from 'next/head'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
-import components from 'site/components/mdx/index.js'
+import { mdxLoader } from 'shared/mdx/loader.mjs'
import { jargon } from 'site/jargon.mjs'
-// MDX paths
-import mdxPaths from 'site/prebuild/mdx.paths.js'
+import { mdxPaths } from 'site/prebuild/mdx.paths.mjs'
+// Components
+import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
+import { TocWrapper } from 'shared/components/wrappers/toc.mjs'
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { components } from 'site/components/mdx/index.mjs'
const MdxPage = (props) => {
// This hook is used for shared code and global state
@@ -26,7 +28,7 @@ const MdxPage = (props) => {
* active state
*/
return (
-
+
@@ -53,7 +55,7 @@ const MdxPage = (props) => {
)}
-
+
)
}
diff --git a/sites/org/pages/docs/index.js b/sites/org/pages/docs/index.mjs
similarity index 78%
rename from sites/org/pages/docs/index.js
rename to sites/org/pages/docs/index.mjs
index f2d75e8bd61..c9f93b30ea8 100644
--- a/sites/org/pages/docs/index.js
+++ b/sites/org/pages/docs/index.mjs
@@ -1,10 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import mdxLoader from 'shared/mdx/loader'
-import MdxWrapper from 'shared/components/wrappers/mdx'
-import ReadMore from 'shared/components/mdx/read-more.js'
-import { jargon } from 'site/jargon.mjs'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
+// Dependencies
import Head from 'next/head'
+import mdxLoader from 'shared/mdx/loader'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
+import { ReadMore } from 'shared/components/mdx/read-more.mjs'
+import { jargon } from 'site/jargon.mjs'
const DocsPage = ({ title, mdx, bugsnag }) => {
const app = useApp({ bugsnag })
@@ -16,14 +19,14 @@ const DocsPage = ({ title, mdx, bugsnag }) => {
}
return (
-
+
{fullTitle}
-
+
)
}
diff --git a/sites/org/pages/index.js b/sites/org/pages/index.mjs
similarity index 59%
rename from sites/org/pages/index.js
rename to sites/org/pages/index.mjs
index 2d00b0bd6ca..0aba7858176 100644
--- a/sites/org/pages/index.js
+++ b/sites/org/pages/index.mjs
@@ -1,11 +1,14 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import Popout from 'shared/components/popout.js'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
+// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
//import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import PageLink from 'shared/components/page-link'
import Head from 'next/head'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { Popout } from 'shared/components/popout.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { PageLink } from 'shared/components/page-link.mjs'
const HomePage = (props) => {
const app = useApp(props)
@@ -14,18 +17,18 @@ const HomePage = (props) => {
// const { t } = useTranslation(['homepage', 'ograph'])
return (
-
+
{title}
- Create homepage. Meanwhile check
+ Create homepage. Meanwhile check
-
+
)
}
diff --git a/sites/org/pages/signin/index.js b/sites/org/pages/signin/index.mjs
similarity index 89%
rename from sites/org/pages/signin/index.js
rename to sites/org/pages/signin/index.mjs
index 8879c479521..f7dc017a370 100644
--- a/sites/org/pages/signin/index.js
+++ b/sites/org/pages/signin/index.mjs
@@ -1,12 +1,15 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import Link from 'next/link'
import { useState } from 'react'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { validateEmail, validateTld } from 'shared/utils.mjs'
-import SusiWrapper from 'site/components/wrappers/susi.js'
+// Components
+import Link from 'next/link'
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { SusiWrapper } from 'site/components/wrappers/susi.mjs'
const darkLinkClasses = 'decoration-1 underline text-medium font-medium hover:decoration-2'
@@ -29,7 +32,7 @@ const SignInPage = (props) => {
const clearUsername = () => app.setUsername(false)
return (
-
+
{t('welcomeName', { name: app.username || '' })}
@@ -82,7 +85,7 @@ const SignInPage = (props) => {
-
+
)
}
diff --git a/sites/org/pages/signup/index.js b/sites/org/pages/signup/index.mjs
similarity index 90%
rename from sites/org/pages/signup/index.js
rename to sites/org/pages/signup/index.mjs
index 300edb68bbe..414a17f447d 100644
--- a/sites/org/pages/signup/index.js
+++ b/sites/org/pages/signup/index.mjs
@@ -1,15 +1,18 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import useBackend from 'site/hooks/useBackend.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
-import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import Link from 'next/link'
+// Hooks
import { useState } from 'react'
+import { useApp } from 'site/hooks/useApp.mjs'
+import { useBackend } from 'site/hooks/useBackend.mjs'
+import { useTranslation } from 'next-i18next'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { validateEmail, validateTld } from 'shared/utils.mjs'
-import SusiWrapper from 'site/components/wrappers/susi.js'
-import Spinner from 'shared/components/icons/spinner.js'
-import Robot from 'shared/components/robot/index.js'
+// Components
+import Link from 'next/link'
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { SusiWrapper } from 'site/components/wrappers/susi.mjs'
+import { Spinner } from 'shared/components/spinner.mjs'
+import { Robot } from 'shared/components/robot/index.mjs'
// Translation namespaces used on this page
const namespaces = ['signup', 'errors']
@@ -59,7 +62,7 @@ const SignUpPage = (props) => {
const loadingClasses = app.loading ? 'opacity-50' : ''
return (
-
+
{result ? (
@@ -152,7 +155,7 @@ const SignUpPage = (props) => {
>
)}
-
+
)
}
diff --git a/sites/org/pages/typography.js b/sites/org/pages/typography.mjs
similarity index 92%
rename from sites/org/pages/typography.js
rename to sites/org/pages/typography.mjs
index 28767bdc203..aca1d8a4c4f 100644
--- a/sites/org/pages/typography.js
+++ b/sites/org/pages/typography.mjs
@@ -1,6 +1,8 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import Popout from 'shared/components/popout.js'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { Popout } from 'shared/components/popout.mjs'
const TypographyPage = (props) => {
const app = useApp(props)
@@ -13,7 +15,7 @@ const TypographyPage = (props) => {
)
return (
-
+
This typography page shows an overview of different elements and how they are styled.
It's a good starting point for theme development.
@@ -84,7 +86,7 @@ const TypographyPage = (props) => {
)
})}
-
+
)
}
diff --git a/sites/org/pages/welcome/bio.js b/sites/org/pages/welcome/bio.mjs
similarity index 53%
rename from sites/org/pages/welcome/bio.js
rename to sites/org/pages/welcome/bio.mjs
index e5265843f23..c56030316e8 100644
--- a/sites/org/pages/welcome/bio.js
+++ b/sites/org/pages/welcome/bio.mjs
@@ -1,10 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
-import BioSettings, { namespaces as bioNs } from 'site/components/account/bio/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
+import { BioSettings, ns as bioNs } from 'site/components/account/bio/index.mjs'
// Translation namespaces used on this page
const namespaces = [...bioNs, ...authNs]
@@ -14,13 +17,13 @@ const BioPage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -29,7 +32,7 @@ export default BioPage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/org/pages/welcome/compare.js b/sites/org/pages/welcome/compare.mjs
similarity index 53%
rename from sites/org/pages/welcome/compare.js
rename to sites/org/pages/welcome/compare.mjs
index fc843752f82..8e8b0e0d93b 100644
--- a/sites/org/pages/welcome/compare.js
+++ b/sites/org/pages/welcome/compare.mjs
@@ -1,10 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
-import CompareSettings, { namespaces as compareNs } from 'site/components/account/compare/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
+import { CompareSettings, ns as compareNs } from 'site/components/account/compare/index.mjs'
// Translation namespaces used on this page
const namespaces = [...compareNs, ...authNs]
@@ -14,13 +17,13 @@ const ComparePage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -29,7 +32,7 @@ export default ComparePage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/org/pages/welcome/img.js b/sites/org/pages/welcome/img.mjs
similarity index 53%
rename from sites/org/pages/welcome/img.js
rename to sites/org/pages/welcome/img.mjs
index 08ae90f0990..b9d6efbb622 100644
--- a/sites/org/pages/welcome/img.js
+++ b/sites/org/pages/welcome/img.mjs
@@ -1,10 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
-import ImgSettings, { namespaces as imgNs } from 'site/components/account/img/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
+import { ImgSettings, ns as imgNs } from 'site/components/account/img/index.mjs'
// Translation namespaces used on this page
const namespaces = [...imgNs, ...authNs]
@@ -14,13 +17,13 @@ const ImgPage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -29,7 +32,7 @@ export default ImgPage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/org/pages/welcome/index.js b/sites/org/pages/welcome/index.mjs
similarity index 53%
rename from sites/org/pages/welcome/index.js
rename to sites/org/pages/welcome/index.mjs
index 58cb122f9b1..c52fc2d196c 100644
--- a/sites/org/pages/welcome/index.js
+++ b/sites/org/pages/welcome/index.mjs
@@ -1,10 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
-import ControlSettings, { namespaces as controlNs } from 'site/components/account/control/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
+import { ControlSettings, ns as controlNs } from 'site/components/account/control/index.mjs'
// Translation namespaces used on this page
const namespaces = [...controlNs, ...authNs]
@@ -14,13 +17,13 @@ const WelcomePage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -29,7 +32,7 @@ export default WelcomePage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/org/pages/welcome/newsletter.js b/sites/org/pages/welcome/newsletter.mjs
similarity index 55%
rename from sites/org/pages/welcome/newsletter.js
rename to sites/org/pages/welcome/newsletter.mjs
index f40f2d092d6..c0b753a9587 100644
--- a/sites/org/pages/welcome/newsletter.js
+++ b/sites/org/pages/welcome/newsletter.mjs
@@ -1,12 +1,15 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
import NewsletterSettings, {
- namespaces as newsletterNs,
-} from 'site/components/account/newsletter/index.js'
+ ns as newsletterNs,
+} from 'site/components/account/newsletter/index.mjs'
// Translation namespaces used on this page
const namespaces = [...newsletterNs, ...authNs]
@@ -16,13 +19,13 @@ const WelcomePage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -31,7 +34,7 @@ export default WelcomePage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/org/pages/welcome/units.js b/sites/org/pages/welcome/units.mjs
similarity index 53%
rename from sites/org/pages/welcome/units.js
rename to sites/org/pages/welcome/units.mjs
index 340cd3331be..fde0bd9e110 100644
--- a/sites/org/pages/welcome/units.js
+++ b/sites/org/pages/welcome/units.mjs
@@ -1,10 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
-import UnitsSettings, { namespaces as unitsNs } from 'site/components/account/units/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
+import { UnitsSettings, ns as unitsNs } from 'site/components/account/units/index.mjs'
// Translation namespaces used on this page
const namespaces = [...unitsNs, ...authNs]
@@ -14,13 +17,13 @@ const UnitsPage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -29,7 +32,7 @@ export default UnitsPage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/org/pages/welcome/username.js b/sites/org/pages/welcome/username.mjs
similarity index 53%
rename from sites/org/pages/welcome/username.js
rename to sites/org/pages/welcome/username.mjs
index 3fd17127ba0..5548ce3737c 100644
--- a/sites/org/pages/welcome/username.js
+++ b/sites/org/pages/welcome/username.mjs
@@ -1,12 +1,13 @@
-import Page from 'site/components/wrappers/page.js'
-import useApp from 'site/hooks/useApp.js'
-import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Hooks
+import { useApp } from 'site/hooks/useApp.mjs'
import { useTranslation } from 'next-i18next'
-import Layout from 'site/components/layouts/bare'
-import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
-import UsernameSettings, {
- namespaces as usernameNs,
-} from 'site/components/account/username/index.js'
+// Dependencies
+import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
+// Components
+import { PageWrapper } from 'site/components/wrappers/page.mjs'
+import { BareLayout } from 'site/components/layouts/bare.mjs'
+import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
+import { UsernameSettings, ns as usernameNs } from 'site/components/account/username/index.mjs'
// Translation namespaces used on this page
const namespaces = [...usernameNs, ...authNs]
@@ -16,13 +17,13 @@ const UsernamePage = (props) => {
const { t } = useTranslation(namespaces)
return (
-
+
-
+
)
}
@@ -31,7 +32,7 @@ export default UsernamePage
export async function getStaticProps({ locale }) {
return {
props: {
- ...(await serverSideTranslations(locale)),
+ ...(await serverSideTranslations(locale, namespaces)),
},
}
}
diff --git a/sites/shared/components/breadcrumbs.js b/sites/shared/components/breadcrumbs.mjs
similarity index 83%
rename from sites/shared/components/breadcrumbs.js
rename to sites/shared/components/breadcrumbs.mjs
index 8c6be43924b..d2af7575e00 100644
--- a/sites/shared/components/breadcrumbs.js
+++ b/sites/shared/components/breadcrumbs.mjs
@@ -1,8 +1,7 @@
-import React from 'react'
import Link from 'next/link'
-import FreeSewingIcon from 'shared/components/icons.mjs'
+import { FreeSewingIcon } from 'shared/components/icons.mjs'
-const Breadcrumbs = ({ crumbs = [], title }) =>
+export const Breadcrumbs = ({ crumbs = [], title }) =>
crumbs ? (
-
@@ -30,5 +29,3 @@ const Breadcrumbs = ({ crumbs = [], title }) =>
))}
) : null
-
-export default Breadcrumbs
diff --git a/sites/shared/components/code.js b/sites/shared/components/code.mjs
similarity index 55%
rename from sites/shared/components/code.js
rename to sites/shared/components/code.mjs
index d20979b734b..c50925e1128 100644
--- a/sites/shared/components/code.js
+++ b/sites/shared/components/code.mjs
@@ -1,5 +1,3 @@
-const Code = ({ children }) => (
+export const Code = ({ children = null }) => (
{children}
)
-
-export default Code
diff --git a/sites/shared/components/copy-to-clipboard.js b/sites/shared/components/copy-to-clipboard.mjs
similarity index 74%
rename from sites/shared/components/copy-to-clipboard.js
rename to sites/shared/components/copy-to-clipboard.mjs
index 443940a25b1..8ba5f9594ca 100644
--- a/sites/shared/components/copy-to-clipboard.js
+++ b/sites/shared/components/copy-to-clipboard.mjs
@@ -1,7 +1,7 @@
import ReactDOMServer from 'react-dom/server'
import { useState } from 'react'
import { CopyIcon } from 'shared/components/icons.mjs'
-import { CopyToClipboard } from 'react-copy-to-clipboard'
+import { CopyToClipboard as Copy } from 'react-copy-to-clipboard'
const strip = (html) =>
typeof DOMParser === 'undefined'
@@ -13,19 +13,17 @@ const handleCopied = (setCopied) => {
setTimeout(() => setCopied(false), 1000)
}
-const CopyToClipboardIcon = ({ content }) => {
+export const CopyToClipboard = ({ content }) => {
const [copied, setCopied] = useState(false)
const text =
typeof content === 'string' ? content : strip(ReactDOMServer.renderToStaticMarkup(content))
return (
-
handleCopied(setCopied)}>
+ handleCopied(setCopied)}>
-
+
)
}
-
-export default CopyToClipboardIcon
diff --git a/sites/shared/components/docs-link.js b/sites/shared/components/docs-link.mjs
similarity index 52%
rename from sites/shared/components/docs-link.js
rename to sites/shared/components/docs-link.mjs
index 6c47738c095..2661396cb22 100644
--- a/sites/shared/components/docs-link.js
+++ b/sites/shared/components/docs-link.mjs
@@ -1,12 +1,8 @@
-import PageLink from './page-link'
+import PageLink from './page-link.mjs'
import get from 'lodash.get'
-import useApp from 'site/hooks/useApp'
+import useApp from 'site/hooks/useApp.mjs'
-const DocsLink = ({ slug }) => {
+export const DocsLink = ({ slug }) => {
const app = useApp()
return
}
-
-export default DocsLink
-
-
diff --git a/sites/shared/components/error/error-boundary.js b/sites/shared/components/error/error-boundary.mjs
similarity index 90%
rename from sites/shared/components/error/error-boundary.js
rename to sites/shared/components/error/error-boundary.mjs
index ac6c2367d42..41cdf1cb26c 100644
--- a/sites/shared/components/error/error-boundary.js
+++ b/sites/shared/components/error/error-boundary.mjs
@@ -1,7 +1,7 @@
import React from 'react'
-import ResetButtons from './reset-buttons'
+import { ResetButtons } from './reset-buttons'
import { LogGroup } from 'shared/components/workbench/logs'
-import DefaultErrorView from './view'
+import { ErrorView as DefaultErrorView } from './view'
const ErrorView = (props) => {
if (props.children) return props.children
@@ -22,7 +22,7 @@ const ErrorView = (props) => {
)
}
-class ErrorBoundary extends React.Component {
+export class ErrorBoundary extends React.Component {
constructor(props) {
super(props)
this.state = { hasError: false }
@@ -65,5 +65,3 @@ class ErrorBoundary extends React.Component {
}
}
}
-
-export default ErrorBoundary
diff --git a/sites/shared/components/error/reset-buttons.js b/sites/shared/components/error/reset-buttons.js
deleted file mode 100644
index 714644751c6..00000000000
--- a/sites/shared/components/error/reset-buttons.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import { useTranslation } from 'next-i18next'
-
-export default function ({resetGist, undoGist}) {
- const {t} = useTranslation(['app'])
-
- return (
-
-
-
-)}
diff --git a/sites/shared/components/error/reset-buttons.mjs b/sites/shared/components/error/reset-buttons.mjs
new file mode 100644
index 00000000000..a45cf19fe85
--- /dev/null
+++ b/sites/shared/components/error/reset-buttons.mjs
@@ -0,0 +1,18 @@
+import { useTranslation } from 'next-i18next'
+
+// FIXME: I feel this should be kept closer to where it's used
+
+export const ResetButtons = ({ resetGist, undoGist }) => {
+ const { t } = useTranslation(['app'])
+
+ return (
+
+
+
+
+ )
+}
diff --git a/sites/shared/components/error/view.js b/sites/shared/components/error/view.js
deleted file mode 100644
index fda20b980f9..00000000000
--- a/sites/shared/components/error/view.js
+++ /dev/null
@@ -1,59 +0,0 @@
-import Robot from 'shared/components/robot/index.js'
-import Popout from 'shared/components/popout.js'
-import { useTranslation } from 'next-i18next'
-import { useState } from 'react'
-
-const Error = ({ children, inspectChildren}) => {
-
- const { t } = useTranslation(['errors'])
- const [share, setShare] = useState(false)
-
- return (
-
-
-
-
-
{t('errors:something')}
- {children}
-
-
-
-
-
- Would you like to report this problem?
-
- You can help us make FreeSewing better by reporting this problem.
-
- If you choose to report this:
-
- -
- We will compile a crash report that contains everything needed to recreate this problem
-
- -
- We will include personal data such as your username,
- email address and measurements
-
- -
- We will share this report and the data in it with FreeSewing's bughunters team who will investigate the problem on your behalf
-
- - Your personal data will not be shared publicly
-
-
-
-
-
-
-
-
- If you prefer not to share any info, or want to investigate the problem yourself, you can do so:
-
- {inspectChildren}
-
-
)
-}
-
-export default Error
diff --git a/sites/shared/components/error/view.mjs b/sites/shared/components/error/view.mjs
new file mode 100644
index 00000000000..d078c292934
--- /dev/null
+++ b/sites/shared/components/error/view.mjs
@@ -0,0 +1,76 @@
+import { useTranslation } from 'next-i18next'
+import { useState } from 'react'
+import { Robot } from 'shared/components/robot/index.mjs'
+import { Popout } from 'shared/components/popout.mjs'
+
+export const ErrorView = ({ children, inspectChildren }) => {
+ const { t } = useTranslation(['errors'])
+ const [share, setShare] = useState(false)
+
+ return (
+
+
+
+
+
{t('errors:something')}
+ {children}
+
+
+
+
+
+ Would you like to report this problem?
+
+ You can help us make FreeSewing better by reporting this problem.
+
+ If you choose to report this:
+
+ -
+ We will compile a crash report that contains everything needed{' '}
+ to recreate this problem
+
+ -
+ We will include personal data such as your username,{' '}
+ email address and measurements
+
+ -
+ We will share this report and the data in it with{' '}
+
+ FreeSewing's bughunters team
+ {' '}
+ who will investigate the problem on your behalf
+
+ -
+ Your personal data will not be shared publicly
+
+
+
+
+
+
+
+
+
+ If you prefer not to share any info, or want to investigate the problem yourself, you can
+ do so:
+
+ {inspectChildren}
+
+
+ )
+}
diff --git a/sites/shared/components/icons.mjs b/sites/shared/components/icons.mjs
index 1565fc153b5..0cd0a2ec2f4 100644
--- a/sites/shared/components/icons.mjs
+++ b/sites/shared/components/icons.mjs
@@ -1,7 +1,14 @@
-export const IconWrapper = ({ className = 'w-6 h-6', stroke = 2, children = null }) => (
+import { logoPath } from 'shared/components/logos/freesewing.mjs'
+
+export const IconWrapper = ({
+ className = 'w-6 h-6',
+ stroke = 2,
+ children = null,
+ fill = false,
+}) => (
)
-
-export default Loader
diff --git a/sites/shared/components/locale-picker/index.js b/sites/shared/components/locale-picker/index.mjs
similarity index 91%
rename from sites/shared/components/locale-picker/index.js
rename to sites/shared/components/locale-picker/index.mjs
index 75434295cd6..b431e6c9ee0 100644
--- a/sites/shared/components/locale-picker/index.js
+++ b/sites/shared/components/locale-picker/index.mjs
@@ -1,13 +1,15 @@
+// Dependencies
import { Fragment } from 'react'
-import { LocaleIcon, DownIcon } from 'shared/components/icons.mjs'
import { useRouter } from 'next/router'
import { useTranslation } from 'next-i18next'
import { Popover, Transition } from '@headlessui/react'
import Link from 'next/link'
+// Components
+import { I18nIcon, DownIcon } from 'shared/components/icons.mjs'
export const ns = ['locales']
-const LocalePicker = ({ iconOnly = false, bottom = false }) => {
+export const LocalePicker = ({ iconOnly = false, bottom = false }) => {
const { t } = useTranslation(ns)
const router = useRouter()
@@ -18,7 +20,7 @@ const LocalePicker = ({ iconOnly = false, bottom = false }) => {
@@ -61,5 +63,3 @@ const LocalePicker = ({ iconOnly = false, bottom = false }) => {
)
}
-
-export default LocalePicker
diff --git a/sites/shared/components/logos/cc-by.js b/sites/shared/components/logos/cc-by.js
deleted file mode 100644
index d6e75e61a56..00000000000
--- a/sites/shared/components/logos/cc-by.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const CcByLogo = ({ color='currentColor', className="w-6 h-6" }) => (
-
-)
-
-export default CcByLogo
diff --git a/sites/shared/components/logos/cc-by.mjs b/sites/shared/components/logos/cc-by.mjs
new file mode 100644
index 00000000000..0adc678d1a1
--- /dev/null
+++ b/sites/shared/components/logos/cc-by.mjs
@@ -0,0 +1,9 @@
+export const CCByLogo = ({ color = 'currentColor', className = 'w-6 h-6' }) => (
+
+)
diff --git a/sites/shared/components/logos/cc.js b/sites/shared/components/logos/cc.js
deleted file mode 100644
index edfdc3dbd18..00000000000
--- a/sites/shared/components/logos/cc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const CreativeCommonsLogo = ({ color='currentColor', className="w-40" }) => (
-
-)
-
-export default CreativeCommonsLogo
diff --git a/sites/shared/components/logos/cc.mjs b/sites/shared/components/logos/cc.mjs
new file mode 100644
index 00000000000..03e45c3b335
--- /dev/null
+++ b/sites/shared/components/logos/cc.mjs
@@ -0,0 +1,8 @@
+export const CCLogo = ({ color = 'currentColor', className = 'w-40' }) => (
+
+)
diff --git a/sites/shared/components/logos/freesewing.js b/sites/shared/components/logos/freesewing.js
deleted file mode 100644
index 04cfba1d590..00000000000
--- a/sites/shared/components/logos/freesewing.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react'
-import { logoPath } from 'shared/components/icons/freesewing.js'
-import colors from 'tailwindcss/colors'
-
-const strokes = {
- light: colors.neutral[300],
- dark: colors.neutral[800],
- hax0r: colors.lime[700],
- lgbtq: colors.neutral[500],
- trans: colors.neutral[500],
-}
-let step = 0
-
-const Logo = ({ className = 'w-20 h-20', theme = 'light', stroke = false }) => {
- const svgProps = {
- xmlns: 'http://www.w3.org/2000/svg',
- viewBox: '1 0 25 25',
- className: className,
- }
- return (
-
- )
-}
-
-export default Logo
diff --git a/sites/shared/components/logos/freesewing.mjs b/sites/shared/components/logos/freesewing.mjs
new file mode 100644
index 00000000000..a933ec9c26f
--- /dev/null
+++ b/sites/shared/components/logos/freesewing.mjs
@@ -0,0 +1,36 @@
+import React from 'react'
+import colors from 'tailwindcss/colors'
+
+const strokes = {
+ light: colors.neutral[300],
+ dark: colors.neutral[800],
+ hax0r: colors.lime[700],
+ lgbtq: colors.neutral[500],
+ trans: colors.neutral[500],
+}
+let step = 0
+
+export const logoPath =
+ 'm18.56 0c-0.4945 0.3515-0.469 0.3065-0.8685 0.437-0.916 0.2995-1.7945 0.135-2.837 0.048-0.3135-0.035-0.6245-0.0555-0.928-0.0575-1.5325-0.0105-2.834 0.439-3.0805 1.694-0.4545 0.2755-0.8725 0.609-1.2865 0.943-0.884 0.6975-1.5495 1.55-2.0035 2.5775-0.62 1.5175-0.06 3.146 0.2175 4.684 0.066 0.36 0.135 0.703 0.172 0.8355 0.0525 0.1865 0.145 0.3645 0.2455 0.5245 0.0235 4e-3 0.1475-0.187 0.177-0.2715 0.043-0.123 0.0385-0.3205-0.0085-0.4905-0.104-0.3825-0.203-0.693-0.2115-0.849-0.015-0.293 0.042-0.5635 0.149-0.6975 0.038-0.0475 0.125 0.1975 0.1025 0.2885-0.0265 0.1095-0.0465 0.297-0.038 0.3835 0.0235 0.293 0.0665 0.6065 0.12 0.8805 0.0685 0.3535 0.098 0.5805 0.0855 0.6685-9e-3 0.064-0.039 0.1285-0.154 0.3265-0.1 0.1735-0.152 0.314-0.16 0.438-0.0085 0.121 0.028 0.4235 0.062 0.4975 0.0495 0.1155 0.1985 0.237 0.3285 0.267 0.1245 0.0475 0.187 0.146 0.251 0.2565 0.1555 0.2965 0.2755 0.6575 0.3945 1.2015 0.058 0.2605 0.1065 0.493 0.122 0.615-0.96 1e-3 -2.1895 0.0015-3.3095 0.0015-0.377 6e-3 -1.058-0.171-1.6825-0.212-0.0905-0.977-0.5195-2.112-1.2535-2.178-0.501-0.0455-0.9165 0.145-1.268 0.9365l0.01 0.0425c0.2075-0.1735 0.4265-0.704 1.2155-0.6675 0.606 0.0275 0.808 1.1745 0.868 1.8645-0.369 0.027-0.683 0.1405-0.847 0.424h-0.0035c0 5e-4 0 0.0015 0.0015 0.0025-0.0015 1e-3 -0.0015 2e-3 -0.0015 3e-3h0.0035c0.169 0.2905 0.4945 0.403 0.877 0.4255 0.2555 7.225 7.047 8.157 8.903 8.157 6.924 0 9.348-4.705 9.7125-6.5685 0.1705 0.794-0.3665 1.8055-0.495 2.552 1.4605-1.6885 1.1965-3.312 0.9295-4.945 0.222 0.264 0.5225 0.4275 0.93 0.337-0.2905-0.194-0.6845-0.058-0.9205-0.8765-0.103-0.3535-0.192-0.6185-0.2805-0.841-0.191-0.7165-0.462-1.401-0.795-2.068-0.281-0.7235-0.0955-1.1925-0.1235-1.8135 0.5055 1.667 0.8215 2.1105 1.4115 2.285-1.484-1.788-0.976-4.5565-1.8145-7.0275 0.3795 0.223 0.8125 0.29 1.2735 0.0175-0.446-0.127-0.891 0.2085-1.531-0.732-0.5405-1.0515-1.3235-1.828-2.2735-2.513-0.509-0.332-1.074-0.555-1.642-0.762 0.5785-0.145 1.2245-0.66 1.2545-1.0445zm-0.9705 5.5535c0.762 0.278 1.602 1.334 1.5925 2.37v0.058c-0.0205 1.407-0.66 2.1635-0.633 3.1005 0.0345 1.1035 0.5095 1.4885 0.604 1.6725-0.162-0.6805-0.257-1.5365-0.043-2.2145 0.275-0.872 0.5525-1.594 0.5325-2.277-0.01-0.16-0.078-0.7585-0.1235-1.0235 0.817 1.179-0.177 2.8935 0.109 4.0155 0.497 1.9545 2.7245 2.2015 2.0615 6.1395-0.5835 3.462-4.5815 6.0895-8.6795 6.0895-3.038 0-8.3025-1.6815-8.5625-7.646 0.6175-0.044 1.2815-0.216 1.654-0.21 1.126 0 2.412 5e-4 3.381 1e-3 0.182 0.821 0.3185 1.019 1.009 1.566 0.768 0.604 0.947 0.6775 2.083 0.6885 1.1365 0.0115 1.4735-0.232 2.576-1.275 0.238-0.279 0.341-0.6445 0.4565-0.988 1.134-0.0105 1.961-0.0305 2.7745-0.0685 0.8285-0.0375 0.9455 0 2.2805-0.1375-1.335-0.1375-1.452-0.1-2.2805-0.138-0.792-0.036-1.594-0.0565-2.6785-0.0665 0.091-0.4085 0.221-0.8075 0.3595-1.202 0.0855-0.2325 0.186-0.459 0.289-0.6845l0.1125-0.035c0.217-0.077 0.409-0.242 0.4855-0.465 0.0985-0.2955 0.0285-0.6275-0.162-0.869-0.0655-0.0905-0.147-0.206-0.1805-0.257-0.1005-0.159-0.103-0.2475-0.018-0.8385 0.0715-0.495 0.0795-0.754 0.03-1.005-0.01-0.1435-0.011-0.4385-0.0155-0.518 0.038 0.021 0.1205 0.209 0.204 0.4635 0.083 0.2555 0.0965 0.3085 0.1155 0.526 0.021 0.247-0.0715 0.43-0.1475 0.7985-0.038 0.19-0.0715 0.3665-0.0715 0.3905 0 0.0255 0.018 0.0795 0.037 0.1215 0.0445 0.094 0.128 0.226 0.1435 0.226 0.2725-0.3005 0.4325-0.6715 0.575-1.048 0.15-0.426 0.194-0.878 0.299-1.3165 0.085-0.382 0.183-0.7645 0.2135-1.1565 0.0615-0.765 0.0255-1.305-0.1435-2.102-0.0405-0.18-0.1575-0.5235-0.239-0.6855zm-2.68 3.7685c0.2925-0.0035 0.582 0.032 0.8575 0.1115 0.3745 0.1435 0.427 0.478 0.496 0.8535 0.0385 0.24 0.037 0.4125-0.0065 0.6945-0.0305 0.409-0.193 0.7255-0.548 0.948-0.5355 0.099-1.108 0.1945-1.562-0.16-0.381-0.525-0.6105-1.1885-0.523-1.8355 0.0555-0.2655 0.179-0.4035 0.433-0.486 0.2735-0.0785 0.563-0.1215 0.853-0.126zm-4.4415 0.0475c0.2735-0.0025 0.55 0.0265 0.702 0.1235 0.6525 0.4415 0.443 1.16 0.185 1.7905-0.3755 0.8255-1.1875 0.795-1.9745 0.7885-0.4355-0.1275-0.4755-0.4845-0.5385-0.866-0.054-0.3685-0.169-0.7635-0.073-1.134 0.2465-0.596 1.1475-0.6645 1.699-0.7025zm9.9515 0.103c0.0035 1.5865 0.2745 2.366 0.8185 3.4895-0.3205-0.6115-0.7785-0.9595-0.949-1.6905-0.326-1.4115 0.0255-1.3325 0.1305-1.799zm-7.9065 1.149c0.086 0.087 0.1275 0.207 0.202 0.3025 0.0575-0.0985 0.1165-0.1965 0.1905-0.284 0.0385 1e-3 0.0855 0.077 0.128 0.213 0.182 0.503 0.2175 1.0565 0.4535 1.54 0.2205 0.35-0.0805 0.554-0.411 0.57-0.241-5e-4 -0.343-0.165-0.4845-0.328-0.0365 0.1065-0.106 0.175-0.189 0.247-0.211 0.177-0.6245 0.1115-0.6885-0.1675 0.085-0.533 0.3565-1.0225 0.5345-1.5335 0.0885-0.1865 0.0895-0.3295 0.2645-0.5595zm-3.096 2.6925c0.1065 0 0.399 0.1985 0.4585 0.3105 0.041 0.0745 0.1345 0.3645 0.141 0.435 0.0105 0.084-0.015 0.283-0.041 0.337-0.019 0.0385-0.0335 0.044-0.0555 0.019-0.0185-0.021-0.2635-0.491-0.42-0.802-0.123-0.249-0.136-0.2995-0.083-0.2995zm6.111 0.1555c4e-3 5e-4 0.01 2e-3 0.0155 0.0035 0.033 0.0135 0.01 0.1305-0.114 0.5555-0.0235 0.128-0.0805 0.229-0.164 0.313-0.0275 0-0.04-0.032-0.083-0.2095-0.0365-0.1515-0.0405-0.2865-0.015-0.4075 0.044-0.1515 0.222-0.198 0.3605-0.255zm-0.7415 0.9265c0.0105-2e-3 0.0205 0.0035 0.0335 0.014 0.045 0.0315 0.0515 0.1145 0.0215 0.277-0.0365 0.209-0.0445 0.232-0.0985 0.2535-0.0235 0.0105-0.0655 0.018-0.0935 0.018-0.0505-9e-3 -0.0635-0.05-0.0515-0.112 0-0.13 0.038-0.243 0.124-0.3765 0.0325-0.05 0.049-0.0715 0.0645-0.074zm-4.3165 0.0095c0.0345 0 0.1385 0.075 0.177 0.127 0.043 0.055 0.092 0.3825 0.0645 0.439-0.0315 0.071-0.1855 0.0355-0.228-0.053-0.026-0.053-0.0875-0.339-0.0875-0.407 0-0.063 0.0305-0.106 0.074-0.106zm3.9455 0.0865c0.042 0.06 0.053 0.137 0.044 0.306l-0.0085 0.154-0.044 0.044c-0.0265 0.0245-0.0715 0.0545-0.0985 0.067-0.0595 0.028-0.105 0.0305-0.1135 8e-3 -0.01-0.03 7e-3 -0.221 0.0255-0.2855 0.0215-0.0665 0.118-0.265 0.15-0.307 0.0145-0.0385 0.0315 0.0095 0.045 0.0135zm-2.5105-9e-3c0.0905 0.023 0.1305 0.1045 0.18 0.1785l0.0335 0.066-0.047 0.1635c-0.025 0.09-0.0515 0.171-0.0595 0.18-9e-3 0.01-0.0425 0.015-0.092 0.0145-0.132-0.0035-0.147-9e-3 -0.1825-0.063l-0.033-0.049 0.028-0.1375c0.0405-0.198 0.06-0.2575 0.105-0.3085 0.0235-0.0275 0.047-0.0425 0.0675-0.0445zm-0.8355 0.1415 0.0745 0.0745 0.0125 0.1685c0.0065 0.092 0.0095 0.1775 0.0045 0.188-0.0045 0.0145-0.0315 0.0185-0.115 0.0185h-0.1085c-0.058-0.0635-0.076-0.141-0.1005-0.221-0.057-0.2405-0.057-0.35 2e-3 -0.3645 0.0965 6e-3 0.16 0.076 0.2305 0.136zm2.9-0.1155c0.118 0.0315 0.0945 0.219 0.094 0.353-9e-3 0.217-0.0175 0.262-0.0455 0.29-0.0485 0.0485-0.1835 0.0215-0.249-0.0505-0.0215-0.026-0.0235-0.034-0.0065-0.1395 0.0195-0.1285 0.0445-0.2085 0.1-0.3185 0.0405-0.079 0.0785-0.1285 0.107-0.1345zm-2.663 0.01c0.0065-5e-4 0.017 0 0.027 1e-3 0.075 6e-3 0.145 0.055 0.207 0.145l0.05 0.0735c0.0045 0.1205 0 0.2475-0.0215 0.3595-0.013 0.0065-0.067 0.0165-0.12 0.0215-0.092 0.0085-0.1005 0.0065-0.1325-0.0215-0.0445-0.038-0.057-0.1085-0.068-0.3425-0.0065-0.191-2e-3 -0.2335 0.058-0.2365zm1.1345 0.04c0.0805 0.017 0.1315 0.06 0.154 0.1305 0.018 0.0605 0.029 0.399 0.0115 0.4225-6e-3 0.01-0.044 0.0225-0.0875 0.028-0.162 0.0205-0.305 5e-3 -0.319-0.0335-0.018-0.044 0.1025-0.48 0.147-0.534 0.019-0.042 0.065-0.0095 0.094-0.0135zm1.049 3e-3c0.0355-0.0035 0.0735 0.0305 0.1105 0.103 0.03 0.0605 0.0345 0.0815 0.0345 0.217 0 0.108-0.0065 0.1545-0.018 0.1645-0.01 8e-3 -0.0505 0.0225-0.0935 0.0335-0.075 0.0195-0.0915 0.0215-0.115 0.0135l-0.1125-0.0205 0.0085-0.067c8e-3 -0.0875 0.0655-0.2815 0.106-0.3655 0.024-0.05 0.0515-0.075 0.0795-0.0785zm-0.489 0.0015c0.0235-1e-3 0.0345 0.0045 0.0495 0.021 0.0355 0.042 0.0805 0.166 0.109 0.2985 0.038 0.1865 0.038 0.186-0.0435 0.2105-0.0355 0.011-0.1105 0.0225-0.164 0.0255-0.1765 9e-3 -0.19-0.0015-0.1685-0.1575 0.017-0.139 0.0855-0.358 0.115-0.374 0.032-0.017 0.069-0.0165 0.1025-0.024zm-8.9965 0.7045c0.0015-5e-4 0.0035 0 0.0035 0 0.0045 0.0975 0.0045 0.196 0.0065 0.294-0.2475-0.019-0.4295-0.078-0.4295-0.1475 0-0.0685 0.1755-0.127 0.4195-0.1465zm0.4325 0.0085c0.2005 0.025 0.339 0.0775 0.3365 0.138 0 0.061-0.134 0.113-0.333 0.1375-2e-3 -0.0915-2e-3 -0.1835-0.0035-0.2755zm9.363 0.2665c0.017-0.0015 0.0245-3e-3 0.0505-5e-4 0.104 0.0105 0.119 0.017 0.119 0.052 0 0.046-0.079 0.1845-0.1325 0.2325-0.025 0.024-0.0595 0.044-0.0715 0.044-0.06 0-0.095-0.1265-0.067-0.243 0.017-0.063 0.048-0.0825 0.1015-0.085zm-0.3775 0.0415c0.0465-4e-3 0.0915 0.0085 0.1365 0.0145-0.013 0.1315-0.072 0.239-0.1815 0.3105-0.027 0-0.0405-0.0515-0.0405-0.164 0-0.134 7e-3 -0.1595 0.0855-0.161zm-0.414 0.0485c0.0965 0 0.1815 0.0045 0.1855 0.01 0.018 0.017-0.034 0.146-0.1105 0.277-0.0655 0.1165-0.075 0.125-0.1155 0.128-0.159-0.018-0.1545-0.2045-0.179-0.3325 0-0.076 0.017-0.0825 0.2195-0.0825zm-1.5045 0.0145c0.1105 2e-3 0.1535 0.0185 0.1535 0.061 0 0.054-0.041 0.1615-0.0645 0.175-0.0355 0.0195-0.0385 0.0185-0.1085-0.0545-0.1105-0.124-0.123-0.147 0.0195-0.1815zm0.532 0.0055c2e-3 3e-3 0.0235 0.042 0.045 0.086 0.047 0.0915 0.0505 0.1315 0.017 0.162-0.079 0.045-0.0955 0.0195-0.167-0.026-0.083-0.0785-0.1485-0.184-0.127-0.206 0.074-0.0265 0.1555-0.0165 0.232-0.016zm0.211 0.0025 0.1975 0.0035c0.077 0 0.1435 4e-3 0.147 0.01 0.0135 0.012-0.03 0.269-0.0535 0.327-0.027 0.065-0.1215 0.0655-0.1705-0.0115-0.07-0.1105-0.116-0.2035-0.1175-0.2675z'
+
+export const FreeSewingLogo = ({ className = 'w-20 h-20', theme = 'light', stroke = false }) => {
+ const svgProps = {
+ xmlns: 'http://www.w3.org/2000/svg',
+ viewBox: '1 0 25 25',
+ className: className,
+ }
+ return (
+
+ )
+}
diff --git a/sites/shared/components/logos/osi.js b/sites/shared/components/logos/osi.js
deleted file mode 100644
index f1bfa425556..00000000000
--- a/sites/shared/components/logos/osi.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const OsiLogo = ({ color='currentColor', className="w-6 h-6" }) => (
-
-)
-
-export default OsiLogo
diff --git a/sites/shared/components/logos/osi.mjs b/sites/shared/components/logos/osi.mjs
new file mode 100644
index 00000000000..a45a6027db5
--- /dev/null
+++ b/sites/shared/components/logos/osi.mjs
@@ -0,0 +1,10 @@
+export const OsiLogo = ({ color = 'currentColor', className = 'w-6 h-6' }) => (
+
+)
diff --git a/sites/shared/components/mdx/examples.js b/sites/shared/components/mdx/examples.mjs
similarity index 91%
rename from sites/shared/components/mdx/examples.js
rename to sites/shared/components/mdx/examples.mjs
index e18caa1dac0..03da5222c58 100644
--- a/sites/shared/components/mdx/examples.js
+++ b/sites/shared/components/mdx/examples.mjs
@@ -1,5 +1,5 @@
import { Tutorial } from '@freesewing/tutorial'
-import { Examples } from '@freesewing/examples'
+import { Examples as Pattern } from '@freesewing/examples'
import Svg from '../workbench/draft/svg'
import Defs from '../workbench/draft/defs'
import Stack from '../workbench/draft/stack'
@@ -11,7 +11,7 @@ import Md from 'react-markdown'
// head: 320,
// },
//}
-const ExamplesComponent = ({ app, part, caption, xray }) => {
+export const Examples = ({ app, part, caption, xray }) => {
// State for gist
const { gist, unsetGist, updateGist } = useGist('examples-mdx', app)
@@ -21,7 +21,7 @@ const ExamplesComponent = ({ app, part, caption, xray }) => {
}
//const measurements = part.includes('tutorial') ? measurementSets.tutorial : {}
- const pattern = Examples
+ const pattern = Pattern
const draft = new pattern({
only: [`examples.${part}`],
measurements: {},
@@ -61,5 +61,3 @@ const ExamplesComponent = ({ app, part, caption, xray }) => {