Skip to content

Commit

Permalink
fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Jul 26, 2024
1 parent b7d8c4d commit 17afce0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/viewer/components/Metadata.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ function Horizontal({ title, subtitle, logo }) {

export default function Metadata({ metadataRef }) {
const metadata = useStore(mapStore, selectors.getMetadata);
const config = useStore(mapStore, selectors.getMapConfig);

const layout = useMemo(() => {
if (metadata.config.logo_layout === "vertical") {
if (config.logo_layout === "vertical") {
return <Vertical {...metadata} />;
}

return <Horizontal {...metadata} />;
}, [metadata]);
}, [metadata, config]);

return (
<div ref={metadataRef} className="metadata">
Expand Down

0 comments on commit 17afce0

Please sign in to comment.