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:
parent
c2882cce22
commit
d2b4d2d3b3
36 changed files with 2677 additions and 2470 deletions
|
@ -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}` })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue