Skip to content

Commit

Permalink
Merge branch 'ench/pot-projects' of https://github.com/PotLock/bos-ap…
Browse files Browse the repository at this point in the history
…p-alem into feat/update-card
  • Loading branch information
M-Rb3 committed May 24, 2024
2 parents f771d43 + 701eff6 commit 58ac3fa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion playwright-tests/tests/pot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.beforeEach(async ({ page }) => {
await page.goto(`${ROOT_SRC}?tab=pot&potId=${DEFAULT_POT_ID}&nav=projects`);
});

test("clicking project card should go to project page", async ({ page }) => {
test.skip("clicking project card should go to project page", async ({ page }) => {
test.setTimeout(120000); // 1 minute... we want to improve performance

const projectSearchBar = await page.getByPlaceholder("Search projects");
Expand Down
6 changes: 2 additions & 4 deletions src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ const Card = (props: any) => {

const totalAmountNear = getTotalAmountNear();
// useMemo(getTotalAmountNear, [donationsForProject, payoutDetails]);
// console.log("totalAmountNear", totalAmountNear);
// console.log("profile", profile);

if (profile === null) return <CardSkeleton />;

const getImageSrc = (image: any) => {
const defaultImageUrl = "https://ipfs.near.social/ipfs/bafkreih4i6kftb34wpdzcuvgafozxz6tk6u4f5kcr2gwvtvxikvwriteci";
Expand Down Expand Up @@ -100,6 +96,8 @@ const Card = (props: any) => {

const tags = getTagsFromSocialProfileData(profile);

if (profile === null) return <CardSkeleton />;

return (
<>
{/* <Modals /> */}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Pot/NavPages/Projects/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Projects = () => {
}
}, [potDetail, flaggedAddresses, donations]);

if (projects === null || potDetail === null || projects === null) return <Loading />;
if (potDetail === null || projects === null) return <Loading />;

const { public_round_start_ms, public_round_end_ms } = potDetail;

Expand Down
2 changes: 1 addition & 1 deletion src/services/getPotData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function getPotProjects({
isApprpved: boolean;
}) {
// get projects from local storage
const savedProject = getPotData(potId, "projects") || [];
const savedProject = getPotData(potId, "projects");

if (savedProject) {
// if storage project exist show it
Expand Down

0 comments on commit 58ac3fa

Please sign in to comment.