Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f7120f

Browse files
committed
Add insights page
1 parent c32085c commit 1f7120f

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

site/src/AppRouter.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ const AddNewLicensePage = lazy(
179179
const TemplateEmbedPage = lazy(
180180
() => import("./pages/TemplatePage/TemplateEmbedPage/TemplateEmbedPage"),
181181
)
182+
const TemplateInsightsPage = lazy(
183+
() =>
184+
import("./pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage"),
185+
)
182186

183187
export const AppRouter: FC = () => {
184188
return (
@@ -212,6 +216,7 @@ export const AppRouter: FC = () => {
212216
<Route path="files" element={<TemplateFilesPage />} />
213217
<Route path="versions" element={<TemplateVersionsPage />} />
214218
<Route path="embed" element={<TemplateEmbedPage />} />
219+
<Route path="insights" element={<TemplateInsightsPage />} />
215220
</Route>
216221

217222
<Route path="workspace" element={<CreateWorkspacePage />} />

site/src/components/TemplateLayout/TemplateLayout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ export const TemplateLayout: FC<{ children?: JSX.Element }> = ({
157157
>
158158
Embed
159159
</NavLink>
160+
<NavLink
161+
to={`/templates/${templateName}/insights`}
162+
className={({ isActive }) =>
163+
combineClasses([
164+
styles.tabItem,
165+
isActive ? styles.tabItemActive : undefined,
166+
])
167+
}
168+
>
169+
Insights
170+
</NavLink>
160171
</Stack>
161172
</Margins>
162173
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const TemplateInsightsPage = () => {
2+
return <div>TemplateInsightsPage</div>
3+
}
4+
5+
export default TemplateInsightsPage

0 commit comments

Comments
 (0)