@@ -16,22 +16,22 @@ import PropTypes from "prop-types";
1616 *
1717 */
1818
19- const origin = typeof window !== "undefined" ? window . location . origin : "" ;
20-
2119const navItems = [
22- { label : "Home" , url : "/" } ,
23- { label : "Publications" , url : `${ origin } /resources/` } ,
20+ { label : "Home" , url : "/" , internal : true } ,
21+ { label : "Publications" , url : `/resources/` , internal : true } ,
2422 {
2523 label : "In numbers" ,
26- url : `${ origin } /community-stats/#numbers` ,
24+ url : `/community-stats/#numbers` ,
25+ internal : true ,
2726 } ,
2827 {
2928 label : "Case studies" ,
30- url : `${ origin } /community-stats/#case-studies` ,
29+ url : `/community-stats/#case-studies` ,
30+ internal : true ,
3131 } ,
32- { label : "Blog" , url : "https://datacebo.com/blog" } ,
33- { label : "Company" , url : "https://datacebo.com" } ,
34- { label : "GitHub" , url : "https://github.com/sdv-dev/SDV" } ,
32+ { label : "Blog" , url : "https://datacebo.com/blog" , internal : false } ,
33+ { label : "Company" , url : "https://datacebo.com" , internal : false } ,
34+ { label : "GitHub" , url : "https://github.com/sdv-dev/SDV" , internal : false } ,
3535] ;
3636
3737const Navigation = ( { navClass, children, isDark } ) => {
@@ -129,7 +129,7 @@ const Navigation = ({ navClass, children, isDark }) => {
129129 >
130130 < div className = " flex lg:flex-row flex-col justify-center items-center w-full" >
131131 { navItems . map ( ( navItem , i ) => {
132- if ( navItem . url . match ( / ^ \s ? h t t p ( s ? ) / gi ) ) {
132+ if ( ! navItem . internal ) {
133133 return (
134134 < a
135135 className = { navClass }
0 commit comments