Sha256: 6f63ecc663c20c11fe4cbda321c171b0cf5f4a93e41ddd1ecf65183203cd861c

Contents?: true

Size: 623 Bytes

Versions: 6

Compression:

Stored size: 623 Bytes

Contents

import { Button, Typography } from '@mui/material'
import { useNavigate } from 'react-router-dom'
import { usersService } from '@/services/users-service'
import PageLayout from '@/layouts/page-layout'

const Home = () => {
  const navigate = useNavigate()
  const handleLogout = async () => {
    try {
      await usersService.signOut()
      navigate('/sign_in')
    } catch (e) {
      /* handle error */
    }
  }

  return (
    <PageLayout>
      <Typography variant='h4'>Home</Typography>
      <Button variant='contained' onClick={() => handleLogout()}>Log out</Button>
    </PageLayout>
  )
}

export default Home

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
flamerb-0.3.0 templates/frontend/pages/home/index.jsx
flamerb-0.2.3 templates/frontend/pages/home/index.jsx
flamerb-0.2.0 templates/frontend/pages/home/index.jsx
flamerb-0.1.3 templates/frontend/pages/home/index.jsx
flamerb-0.1.2 templates/frontend/pages/home/index.jsx
flamerb-0.1.1 templates/frontend/pages/home/index.jsx