Skip to content

Commit b758b17

Browse files
committed
Fix SitemapProps
1 parent f2e3176 commit b758b17

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

packages/components/src/components/Sitemap/Sitemap.tsx

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
/**
2-
* Sitemap displays a hirarchy of links to all the pages in the site.
3-
*/
4-
51
import React from 'react';
62
import { Link } from '../Link/Link';
73

8-
export function getSitemapPath(pathname = '', lang) {
9-
const prefix = pathname.replace(/\/sitemap$/gm, '').replace(/^\//, '');
10-
const path = prefix || lang || '';
11-
return path;
12-
}
4+
// TODO translations
135

146
interface SitemapItem {
157
'@id': string;
@@ -18,6 +10,11 @@ interface SitemapItem {
1810
items?: SitemapItem[];
1911
}
2012

13+
interface SitemapProps {
14+
items?: SitemapItem[];
15+
page_title?: string;
16+
}
17+
2118
const renderItems = (items: SitemapItem[]): JSX.Element => {
2219
return (
2320
<ul>
@@ -34,16 +31,6 @@ const renderItems = (items: SitemapItem[]): JSX.Element => {
3431
);
3532
};
3633

37-
/**
38-
* Sitemap displays a hierarchy of links to all the pages in the site.
39-
* { getNavigation, location, intl, lang, items }
40-
* TODO translations
41-
*/
42-
interface SitemapProps {
43-
items?: any[];
44-
page_title?: string;
45-
}
46-
4734
export function Sitemap({
4835
items,
4936
page_title = 'default title of Sitemap',

0 commit comments

Comments
 (0)