New: Hero Page und Navigation
This commit is contained in:
@ -1,26 +1,14 @@
|
||||
// import { Link, routes } from '@redwoodjs/router'
|
||||
import { Link } from '@redwoodjs/router'
|
||||
import { Metadata } from '@redwoodjs/web'
|
||||
|
||||
import { useAuth } from 'src/auth'
|
||||
import Hero from 'src/components/Hero'
|
||||
|
||||
const HomePage = () => {
|
||||
const user = useAuth()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Metadata title="Home" description="Home page" />
|
||||
|
||||
<h1>HomePage</h1>
|
||||
<p>
|
||||
Find me in <code>./web/src/pages/HomePage/HomePage.tsx</code>
|
||||
</p>
|
||||
{/*
|
||||
My default route is named `home`, link to me with:
|
||||
`<Link to={routes.home()}>Home</Link>`
|
||||
*/}
|
||||
{user && user.isAuthenticated + ' ' + user.hasRole('admin')}
|
||||
<Link to={'/login'}>Login</Link>
|
||||
<Hero />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user