Skip to content

Commit 192ceba

Browse files
committed
docs: hide footer in api page
1 parent dffc5da commit 192ceba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/Footer/index.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ const _t = id => <FormattedMessage id={id} />;
88

99
export class Footer extends Component {
1010

11-
1211
render() {
1312
const locale = getLocale();
1413
const { style } = this.props;
14+
15+
const pathname = typeof window !== 'undefined' ? window.location.pathname : '';
16+
17+
const isHomePage = pathname === `/${locale}` || pathname === `/${locale}/` || pathname === `/`;
18+
19+
if (!isHomePage) {
20+
return null;
21+
}
22+
1523
return (
1624
<footer className="footer" style={{ ...style, zIndex: 10, overflow: 'hidden' }}>
1725
<div className="footer-circle" />

0 commit comments

Comments
 (0)