diff --git a/quartz/components/Explorer.tsx b/quartz/components/Explorer.tsx index 5113d8930..b14e2967d 100644 --- a/quartz/components/Explorer.tsx +++ b/quartz/components/Explorer.tsx @@ -68,12 +68,8 @@ export default ((userOpts?: Partial) => { const Explorer: QuartzComponent = ({ cfg, displayClass, ...props }: QuartzComponentProps) => { const id = `explorer-${numExplorers++}` - const beforeComponents = (opts.components || []).filter( - (c) => c.position === "before" || !c.position, - ) - const afterComponents = (opts.components || []).filter( - (c) => c.position === "after" || !c.position, - ) + const beforeComponents = (opts.components || []).filter((c) => c.position === "before") + const afterComponents = (opts.components || []).filter((c) => c.position === "after") return (
) => {
- {beforeComponents.map((comp, idx) => ( -
- -
- ))} + {beforeComponents.map((comp, idx) => { + const componentName = comp.Component.displayName || `component-${idx}` + const key = `before-${componentName}-${idx}` + return ( +
+ +
+ ) + })} - {afterCOmpoentns.map((comp, idx) => ( -
- -
- ))} + {afterComponents.map((comp, idx) => { + const componentName = comp.Component.displayName || `component-${idx}` + const key = `before-${componentName}-${idx}` + return ( +
+ +
+ ) + })}