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() 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) {