Skip to content

Commit

Permalink
Merge pull request #215 from Arabasta/front-react-home_page
Browse files Browse the repository at this point in the history
front-react-home_page: fix toast showing for admin
  • Loading branch information
zephyrdark authored Aug 18, 2024
2 parents dc1863a + 2e9390e commit 940864e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions front/react/src/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ const HomePage = () => {
const profileData = response.data.data;
setRecommendedPortfolioType(profileData.recommendedPortfolioType);
} catch (error) {
toast({
title: "Fetch Investor Profile Error",
description: "Unable to fetch your recommended portfolio! Please complete your investor profile.",
status: "error",
duration: 3000,
isClosable: true,
position: "top",
});
if (isAuthenticated && isCustomer) {
toast({
title: "Fetch Investor Profile Error",
description: "Unable to fetch your recommended portfolio! Please complete your investor profile.",
status: "error",
duration: 3000,
isClosable: true,
position: "top",
});
}
}
};
fetchInvestorProfile();
}, [isAuthenticated, toast]);
}, [isAuthenticated, isCustomer, toast]);

const imageCardDetails = () => {
if (!isAuthenticated) {
Expand Down

0 comments on commit 940864e

Please sign in to comment.