Recipe card icons and refactoring.
This commit is contained in:
parent
cdca22de48
commit
005c90d13d
@ -17,27 +17,26 @@ const RecipeCard = ({
|
||||
}: RecipeCardProps) => {
|
||||
return (
|
||||
<article>
|
||||
{mainImageUrl ? <img src={mainImageUrl} /> : null}
|
||||
<img src={mainImageUrl} />
|
||||
<div className="title-star-count-container">
|
||||
<h1>{title}</h1>
|
||||
{starCount ? (
|
||||
<span>
|
||||
<FontAwesomeIcon icon="star" size="sm" />
|
||||
{starCount}
|
||||
</span>
|
||||
) : null}
|
||||
<span>
|
||||
<FontAwesomeIcon icon="star" size="sm" />
|
||||
{starCount}
|
||||
</span>
|
||||
</div>
|
||||
<div className="owner-container">
|
||||
{ownerUsername ? <p>{ownerUsername}</p> : null}
|
||||
<span>
|
||||
<FontAwesomeIcon icon="user" />
|
||||
{ownerUsername}
|
||||
</span>
|
||||
</div>
|
||||
<div className="is-public-container">
|
||||
{isPublic !== undefined ? (
|
||||
isPublic ? (
|
||||
<FontAwesomeIcon icon="globe" size="sm" />
|
||||
) : (
|
||||
<FontAwesomeIcon icon="lock" size="sm" />
|
||||
)
|
||||
) : null}
|
||||
{isPublic ? (
|
||||
<FontAwesomeIcon icon="globe" size="sm" />
|
||||
) : (
|
||||
<FontAwesomeIcon icon="lock" size="sm" />
|
||||
)}
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
|
@ -4,6 +4,11 @@ import { routeTree } from './routeTree.gen'
|
||||
import { RouterProvider, createRouter } from '@tanstack/react-router'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
import { AuthProvider, useAuth } from './auth'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { fas } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
// Font-Awesome: load icons
|
||||
library.add(fas)
|
||||
|
||||
// Create router
|
||||
const router = createRouter({
|
||||
|
Loading…
Reference in New Issue
Block a user