Skip to content

Commit

Permalink
fix(Admin): Display navigation as GenericList
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed Jun 13, 2020
1 parent cb81afd commit b72391f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ui/app/containers/AdminLandingPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ import React from 'react';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';

import A from '../../components/A';
import messages from './messages';

import A from '../../components/A';
import ListItem from '../../components/ListItem';
import GenericList from '../../components/GenericList';

export function AdminLandingPage() {
const applyId = (n) => ({ ...n, id: n.label });
const navItems = [
{ label: 'Walk', href: '/admin/walk' },
{ label: 'Resize', href: '/admin/resize' },
].map(applyId);

const ListComponent = ({ item }) => <ListItem item={<A href={item.href}>{item.label}</A>} />;

return (
<div>
<Helmet>
Expand All @@ -15,10 +26,7 @@ export function AdminLandingPage() {
<h1>
<FormattedMessage {...messages.header} />
</h1>
<ul>
<li><A href="/admin/walk">Walk</A></li>
<li><A href="/admin/resize">Resize</A></li>
</ul>
<GenericList items={navItems} error={false} loading={false} component={ListComponent} />
</div>
);
}
Expand Down

0 comments on commit b72391f

Please sign in to comment.