Skip to content

Commit

Permalink
Merge pull request #18 from reedoooo/dev19
Browse files Browse the repository at this point in the history
  • Loading branch information
reedoooo authored Nov 25, 2023
2 parents c25f047 + b9b9cff commit 83e5a81
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -90,7 +94,7 @@ Reed Vogt -
<img src="https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.flaticon.com%2Ffree-icon%2Flinkedin_174857&psig=AOvVaw1F9U7jlNJPTJpYUU2wdKLW&ust=1691527142102000&source=images&cd=vfe&opi=89978449&ved=0CBAQjRxqFwoTCPjpk-Wzy4ADFQAAAAAdAAAAABAJ" alt="LinkedIn" style="width:24px;height:24px;">
</a>

Project Site: tcg-store.netlify.app/
Project Site: https://65624888827a3700084a3478--enhanced-cardstore.netlify.app/

Project Repo: https://github.com/reedoooo/enhanced-card-store#readme

Expand Down
11 changes: 6 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -77,19 +77,20 @@ const App = () => {
});
}
}, [userId, fetchAllCollectionsForUser, setIsLoading, selectedCollection]);
useEffect(() => {
console.log('Checking userId in useEffect:', userId);
setShowLoginDialog(!userId);
}, [userId]);
useEffect(() => {
if (userId && typeof userId === 'string') {
fetchAllDecksForUser()
.then(() => {
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()
Expand Down
10 changes: 5 additions & 5 deletions src/context/CollectionContext/CollectionContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 83e5a81

Please sign in to comment.