www/components/quick-links.tsx

22 lines
649 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() {
2022-05-15 13:56:45 +00:00
return (
<div className='block'>
<div className='h2'>Quick Links</div>
{
Object.entries(Pages).map(([title, link], i) => {
const extern = link.match(/^http/) && `blue extern` || '';
return (
<Link key={i} href={link}>
<a className={`${extern} link button`}>{title}</a>
</Link>
);
})
}
</div>
);
2022-04-28 01:55:18 +00:00
}
export default QuickLinks;