From 005c90d13dc1b5bb67bec8a7fb2b5d699794ec3e Mon Sep 17 00:00:00 2001 From: Jesse Brault Date: Tue, 30 Jul 2024 14:17:38 -0500 Subject: [PATCH] Recipe card icons and refactoring. --- src/components/recipe-card/RecipeCard.tsx | 29 +++++++++++------------ src/main.tsx | 5 ++++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/components/recipe-card/RecipeCard.tsx b/src/components/recipe-card/RecipeCard.tsx index 91416af..8e95277 100644 --- a/src/components/recipe-card/RecipeCard.tsx +++ b/src/components/recipe-card/RecipeCard.tsx @@ -17,27 +17,26 @@ const RecipeCard = ({ }: RecipeCardProps) => { return (
- {mainImageUrl ? : null} +

{title}

- {starCount ? ( - - - {starCount} - - ) : null} + + + {starCount} +
- {ownerUsername ?

{ownerUsername}

: null} + + + {ownerUsername} +
- {isPublic !== undefined ? ( - isPublic ? ( - - ) : ( - - ) - ) : null} + {isPublic ? ( + + ) : ( + + )}
) diff --git a/src/main.tsx b/src/main.tsx index fd9c265..70bcbe2 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -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({