www/components/quick-links.tsx

20 lines
549 B
TypeScript
Raw Normal View History

2022-04-28 01:55:18 +00:00
import Link from 'next/link';
import Pages from '../public/pages.json';
function QuickLinks() {
return (<>
<div className='h2'>Quick Links</div>
{
Pages.map((obj, i) => {
2022-04-28 14:05:26 +00:00
const extern = obj.link.match(/^http/) && `blue extern` || '';
2022-04-28 01:55:18 +00:00
return (
<Link key={i} href={obj.link}>
2022-04-28 14:05:26 +00:00
<a className={`${extern} link button`}>{obj.title}</a>
2022-04-28 01:55:18 +00:00
</Link>
);
})
}
</>);
}
export default QuickLinks;