From 79f8af0b36c44e9c3893887e1a4fbad355cbe066 Mon Sep 17 00:00:00 2001 From: Reed Vogt Date: Sat, 25 Nov 2023 11:56:43 -0800 Subject: [PATCH 1/2] add --- README.md | 6 +++++- src/App.js | 11 ++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 86ebe38..bb3a971 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ Reed Vogt Newcomers to card collection can explore the vast inventory of cards along with their associated costs, providing them an understanding of the financial implications of building a deck. +6. **In-Depth Analysis of Card Performance** + + The collection section of the app provides users a variety of statistics about their collection performance as well as specific cards which enable users to make advanced insights into trends and patterns. + ## Acceptance Tests To ensure the best user experience and seamless functionality, the following acceptance tests are in place: @@ -90,7 +94,7 @@ Reed Vogt - LinkedIn -Project Site: tcg-store.netlify.app/ +Project Site: https://65624888827a3700084a3478--enhanced-cardstore.netlify.app/ Project Repo: https://github.com/reedoooo/enhanced-card-store#readme diff --git a/src/App.js b/src/App.js index 7f0f8ce..7f230e7 100644 --- a/src/App.js +++ b/src/App.js @@ -56,7 +56,7 @@ const App = () => { useEffect(() => { // Open the login dialog and pause splash page if there's no userId - if (!userId) { + if (!userId || typeof userId !== 'string') { setShowLoginDialog(true); setIsLoading(true); // Continue showing splash page } else { @@ -77,10 +77,6 @@ const App = () => { }); } }, [userId, fetchAllCollectionsForUser, setIsLoading, selectedCollection]); - useEffect(() => { - console.log('Checking userId in useEffect:', userId); - setShowLoginDialog(!userId); - }, [userId]); useEffect(() => { if (userId && typeof userId === 'string') { fetchAllDecksForUser() @@ -88,8 +84,13 @@ const App = () => { setIsLoading(false); }) .catch((error) => console.error('Error fetching decks:', error)); + setIsLoading(false); } }, [userId, fetchAllDecksForUser, selectedDeck, setIsLoading]); + useEffect(() => { + console.log('Checking userId in useEffect:', userId); + setShowLoginDialog(!userId); + }, [userId]); // useEffect(() => { // if (userId && typeof userId === 'string') { // fetchUserCart() From b9b9cffc851b3ea1627978afe6474199d3544f69 Mon Sep 17 00:00:00 2001 From: Reed Vogt Date: Sat, 25 Nov 2023 12:09:41 -0800 Subject: [PATCH 2/2] add --- src/context/CollectionContext/CollectionContext.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/context/CollectionContext/CollectionContext.jsx b/src/context/CollectionContext/CollectionContext.jsx index d0be761..eb393c5 100644 --- a/src/context/CollectionContext/CollectionContext.jsx +++ b/src/context/CollectionContext/CollectionContext.jsx @@ -644,11 +644,11 @@ export const CollectionProvider = ({ children }) => { } }, [selectedCollection, setTotalPrice]); - useEffect(() => { - if (allCollections?.length === 0 || allCollections === undefined) { - fetchAndSetCollections(); - } - }, [allCollections, fetchAndSetCollections]); + // useEffect(() => { + // if (allCollections?.length === 0 || allCollections === undefined) { + // fetchAndSetCollections(); + // } + // }, [allCollections, fetchAndSetCollections]); useEffect(() => { if (selectedCollection === null || selectedCollection === undefined) {