www/components/quick-links.tsx

26 lines
713 B
TypeScript
Raw Normal View History

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