2021-08-09 10:52:02 +09:00
|
|
|
// Router
|
|
|
|
import { useRouter } from 'next/router'
|
|
|
|
import React, { useEffect, useState } from 'react'
|
|
|
|
|
|
|
|
// Next.js
|
|
|
|
import Link from 'next/link'
|
|
|
|
|
|
|
|
// Load FontAwesome
|
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
|
|
import { fab } from '@fortawesome/free-brands-svg-icons'
|
|
|
|
import { fas } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
library.add(fab, fas)
|
|
|
|
|
|
|
|
const FontAwesomeMenu = (props) => {
|
2021-08-09 11:15:16 +09:00
|
|
|
const { icon, dest } = props
|
2021-08-09 10:52:02 +09:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
2021-08-09 11:15:16 +09:00
|
|
|
<Link href={dest}>
|
2021-08-09 10:52:02 +09:00
|
|
|
<a>
|
|
|
|
<FontAwesomeIcon icon={icon} className="w-10 h-10 fill-current inline transition duration-200 ease-in-out transform hover:-translate-y-1 hover:scale-110" />
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default FontAwesomeMenu
|