1
0
Fork 0

fix: Merge in develop changes without re-introduced issues

There were some trouble the snuck in when mergin an earlier PR
This commit is contained in:
joostdecock 2023-07-21 18:19:07 +02:00
parent c2882cce22
commit d2b4d2d3b3
36 changed files with 2677 additions and 2470 deletions

View file

@ -2,6 +2,14 @@ import { components } from 'shared/components/mdx/index.mjs'
import { Loading } from 'shared/components/spinner.mjs'
import { useState, useEffect } from 'react'
/**
* Dynamically load and compile mdx
* @param {Function} loader an import function to use to load the mdx
* @param {String} site the site whose component set will be used in rendering the mdx
* @return {Object} props
* @return {React.component} props.MDX an component to render the loaded MDX
* @return {Object} props.frontmatter the frontmatter loaded from the markdown
*/
export const useDynamicMdx = (loader, site = 'org') => {
// State
const [frontmatter, setFrontmatter] = useState({ title: `freeSewing.${site}` })