diff --git a/pages/[roadmap]/[group].tsx b/pages/[roadmap]/[group].tsx
index 3c8e0d91e..4ca77b753 100644
--- a/pages/[roadmap]/[group].tsx
+++ b/pages/[roadmap]/[group].tsx
@@ -18,6 +18,7 @@ import { ChevronRightIcon } from '@chakra-ui/icons';
type RoadmapProps = {
roadmap: RoadmapType;
group: string;
+ isOutlet?: boolean;
};
// @todo error handling
@@ -36,46 +37,59 @@ function TextualRoadmap(props: RoadmapProps) {
const GroupContent =
require(`../../content/${normalizedContentFilePath}`).default;
- const groupParts = group.split(':');
return (
-
-
- }
- >
-
-
- {roadmap.featuredTitle}
-
-
-
- {groupParts.map((groupPart: string, counter: number) => (
-
-
- {groupPart.split('-').join(' ')}
-
-
- ))}
-
-
-
-
-
-
+
+
+
);
}
-export default function Roadmap(props: RoadmapProps) {
+function RoadmapBreadcrumb(props: RoadmapProps) {
const { roadmap, group } = props;
+ const groupParts = group.split(':');
+
+ return (
+ }
+ >
+
+
+ {roadmap.featuredTitle}
+
+
+
+ {groupParts.map((groupPart: string, counter: number) => (
+
+
+ {groupPart.split('-').join(' ')}
+
+
+ ))}
+
+ );
+}
+
+export default function RoadmapGroup(props: RoadmapProps) {
+ const { roadmap, group, isOutlet = false } = props;
+
+ if (isOutlet) {
+ return ;
+ }
+
return (
@@ -84,9 +98,10 @@ export default function Roadmap(props: RoadmapProps) {
description={roadmap?.seo?.description || roadmap.description}
keywords={roadmap?.seo.keywords || []}
/>
-
+
+
-
+
diff --git a/pages/[roadmap]/interactive.tsx b/pages/[roadmap]/interactive.tsx
index 2c7387a0e..cef30f9c3 100644
--- a/pages/[roadmap]/interactive.tsx
+++ b/pages/[roadmap]/interactive.tsx
@@ -8,6 +8,7 @@ import Helmet from '../../components/helmet';
import { useEffect, useRef, useState } from 'react';
import { wireframeJSONToSVG } from '../../lib/renderer';
import { RoadmapPageHeader } from '../../components/roadmap/roadmap-page-header';
+import RoadmapGroup from './[group]';
type RoadmapProps = {
roadmap: RoadmapType;
@@ -18,6 +19,7 @@ function RoadmapRenderer(props: RoadmapProps) {
const { json, roadmap } = props;
const roadmapRef = useRef(null);
+ const [group, setGroup] = useState('');
const [hasError, setHasError] = useState(false);
useEffect(() => {
@@ -28,7 +30,7 @@ function RoadmapRenderer(props: RoadmapProps) {
return;
}
- alert(groupName);
+ setGroup(groupName.replace(/^\d+-/, ''));
});
});
@@ -53,6 +55,8 @@ function RoadmapRenderer(props: RoadmapProps) {
return (
+ {group && }
+
);
@@ -111,8 +115,7 @@ export async function getStaticProps(context: ContextType) {
let roadmapJson = {};
try {
roadmapJson = require(`../../public/project/${roadmapId}.json`);
- } catch (e) {
- }
+ } catch (e) {}
return {
props: {
diff --git a/public/sitemap.xml b/public/sitemap.xml
index 804d0f2e3..beb5c888e 100644
--- a/public/sitemap.xml
+++ b/public/sitemap.xml
@@ -3,7 +3,7 @@
https://roadmap.sh/frontend
monthly
- 2021-12-04T11:15:51.351Z
+ 2021-12-04T12:51:36.560Z
1.0