import React, { FC, useEffect } from 'react'
import { Link } from 'react-router-dom'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPlusCircle } from '@fortawesome/free-solid-svg-icons'

import { setTitle } from '../utils'

const UserApps: FC = () => {
    useEffect(() => {
        setTitle('Your Apps')
    }, [])

    return (
        <div>
            <Link className="button is-primary" to="/apps/new">
                <span className="icon is-small">
                    <FontAwesomeIcon icon={faPlusCircle} />
                </span>
                <span>Create a new App</span>
            </Link>
        </div>
    )
}

export default UserApps
