Skip to content

Commit

Permalink
show visibility of the maps
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Dec 29, 2023
1 parent e53ebbd commit e9ad9ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ body {
table tr:nth-child(odd) {
background-color: aliceblue;
}

.wrapper {
padding: 0.5rem;
}
10 changes: 8 additions & 2 deletions src/pages/index/MapsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ export function MapsList() {

return (
<ul>
{data.data.map(d => <li key={d.slug}><Link to={viewerRoute.to} params={{ mapSlug: d.slug }}>{d.title}</Link></li>)}
{data.data.map(d => (
<li key={d.slug}>
<Link to={viewerRoute.to} params={{ mapSlug: d.slug }}>
{d.title} {d.visibility === 'public' ? <i className="fas fa-globe"></i> : <i className="fas fa-lock"></i>}
</Link>
</li>
))}
</ul>
);
}
}
2 changes: 1 addition & 1 deletion src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function IndexPage() {
})

return (
<div>
<div className="wrapper">
<h1>NINA Maps</h1>
<h3>Published Maps</h3>
<MapsList />
Expand Down

0 comments on commit e9ad9ff

Please sign in to comment.