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