Skip to content

Commit

Permalink
feat: integration new UX (sismo-core#88)
Browse files Browse the repository at this point in the history
* feat: test: slideshow on mobile

* feat: test: slideshow on mobile

* fix: remove btn test

* remove secondary

* feat: large app card done

* feat add secondary button 3D

* fix button loading

* feat: adjust spacing in mobile large card

* feat: small card mobile done

* feat: all cards done and home page

* feat: dynamic featured card sizing

* WIP explore pages

* feat: explore done

* feat remove tags

* feat adjusted hver effect

* feat: space page

* WIP integration

* WIP: first inegrated version

* fix: space link

* fix: get App

* feat: sort app by date

* feat: plugged toggle

---------

Co-authored-by: leo Sayous <[email protected]>
  • Loading branch information
0xbulma and leosayous21 committed Jul 3, 2023
1 parent 62eb3a4 commit a3a42a3
Show file tree
Hide file tree
Showing 108 changed files with 5,417 additions and 2,274 deletions.
12 changes: 11 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ const nextConfig = {
appDir: true,
serverComponentsExternalPackages: ["@sismo-core/sismo-connect-server"],
},

sassOptions: {
additionalData: `@use "styles/color" as color; @use "styles/mixin" as mixin;`,
includePaths: [path.join(__dirname, 'src')],
}
},
redirects: async () => {
return [
{
source: "/the-merge-contributors",
destination: "/space/the-merge-contributors",
permanent: true
},
]
}
}

module.exports = nextConfig
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@
"devDependencies": {
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "14.4.3",
"@types/jest": "^29.5.1",
"@types/styled-components": "^5.1.26",
"@types/testing-library__jest-dom": "5.14.5",
"encoding": "^0.1.13",
"jest": "^29.5.0",
"jest-date-mock": "^1.0.8",
"jest-environment-jsdom": "29.5.0",
"sass": "^1.62.1",
"ts-jest": "^29.1.0",
Expand Down
1 change: 1 addition & 0 deletions space-config/aave-chan-initiative/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const aaveChanInitiativeConfigDemo: SpaceConfig = {
tags: ["Swag"],
image: "aave_chan_initiative_apps_swag_1014x720.png",
ctaText: "Claim your Swag",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x02bcb449a6bd1062017cf0315375afdf",
Expand Down
31 changes: 31 additions & 0 deletions space-config/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import {configsDemo, configsMain} from "./index";

describe('space-config/apps', () => {
it("demo config should not have the same slug", () => {
const slugs = configsDemo.map((space) => space.metadata.slug);
expect(slugs).toEqual([...new Set(slugs)]);
});

it("demo apps should not have the same slug", () => {
const apps = [];
for (let space of configsDemo) {
apps.push(...space.apps);
}
const slugs = apps.map((app) => app.metadata.slug);
expect(slugs).toEqual([...new Set(slugs)]);
});

it("prod config should not have the same slug", () => {
const slugs = configsMain.map((space) => space.metadata.slug);
expect(slugs).toEqual([...new Set(slugs)]);
});

it("prod apps should not have the same slug", () => {
const apps = [];
for (let space of configsMain) {
apps.push(...space.apps);
}
const slugs = apps.map((app) => app.metadata.slug);
expect(slugs).toEqual([...new Set(slugs)]);
});
});
2 changes: 2 additions & 0 deletions space-config/privacy-is-normal/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const privacyIsNormalConfigDemo: SpaceConfig = {
tags: ["Artwork"],
image: "privacy_is_normal_apps_lotery_1014x720.png",
ctaText: "Participate in the Lottery",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x5749773b034573e615026216c628be4d",
Expand Down Expand Up @@ -84,6 +85,7 @@ export const privacyIsNormalConfigDemo: SpaceConfig = {
tags: ["Artwork"],
image: "privacy_is_normal_apps_print_1014x720.png",
ctaText: "Claim Your Artwork",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x325b16d643351175e190a43ce8066da9",
Expand Down
2 changes: 2 additions & 0 deletions space-config/privacy-is-normal/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const privacyIsNormalConfigMain: SpaceConfig = {
tags: ["Artwork"],
image: "privacy_is_normal_apps_lotery_1014x720.png",
ctaText: "Enter the Sybil-Resistant Lottery",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x9dd13bc62ae6809fe9de95475111fc2a",
Expand Down Expand Up @@ -90,6 +91,7 @@ export const privacyIsNormalConfigMain: SpaceConfig = {
image: "privacy_is_normal_apps_print_1014x720.png",
ctaText: "Claim Your Artwork",
slug: "artwork-claim",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x1941996d7a0245ccc2b203847d682298",
Expand Down
7 changes: 7 additions & 0 deletions space-config/sismo/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const sismoConfigDemo: SpaceConfig = {
image: "sismoapps_tg_zk_bot_1014x720.png",
tags: ["Telegram"],
ctaText: "Join our Telegram Group",
createdAt: new Date("2022-07-03T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0xd21d9ab6eaf8bcc16eff8d9a76764eab",
Expand All @@ -61,6 +62,7 @@ export const sismoConfigDemo: SpaceConfig = {
image: "sismoapps_newletter_1014x720.png",
ctaText: "Subscribe to the Newsletter",
tags: ["Newsletter"],
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
authRequests: [
Expand Down Expand Up @@ -100,6 +102,7 @@ export const sismoConfigDemo: SpaceConfig = {
image: "sismoapps_feedback_1014x720.png",
tags: ["Feedback"],
ctaText: "Give Feedback",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0xc429ae9dc0e1fea6591244cdc70ee626",
Expand Down Expand Up @@ -167,6 +170,7 @@ export const sismoConfigDemo: SpaceConfig = {
image: "sismoapps_alpha_tester_1014x720.png",
tags: ["Alpha"],
ctaText: "Become an Alpha Tester",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x7cef438f591d7b391a3eae11b2bd7868",
Expand Down Expand Up @@ -214,6 +218,7 @@ export const sismoConfigDemo: SpaceConfig = {
tags: ["Feedback"],
image: "sismoapps_anon_wall_1014x720.png",
ctaText: "Publish on Contributors' Anon Wall",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x90db0519f15b523cd41bc3557f6d6b91",
Expand Down Expand Up @@ -254,6 +259,7 @@ export const sismoConfigDemo: SpaceConfig = {
tags: ["Event"],
image: "sismoapps_sismo_events_1014x720.png",
ctaText: "Pre-register to Sismo events",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0xb3a074e124ff04ee0d703b528bfd5f4d",
Expand Down Expand Up @@ -298,6 +304,7 @@ export const sismoConfigDemo: SpaceConfig = {
tags: ["Swag"],
image: "sismoapps_swag_lotery_1014x720.png",
ctaText: "Participate in the Swag Lottery",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x4f7fef07fcdce0a81e8f2ea14e8ea6c0",
Expand Down
1 change: 1 addition & 0 deletions space-config/the-merge-contributors/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const theMergeContributorsConfigDemo: SpaceConfig = {
tags: ["Event"],
image: "EthCCtickets_1014x720px.png",
ctaText: "Register to get tickets",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x0f38b4eb4d51fbd7906c9c7574df075e",
Expand Down
2 changes: 2 additions & 0 deletions space-config/the-merge-contributors/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const theMergeContributorsConfigMain: SpaceConfig = {
tags: ["NFT"],
image: "Mergooor_NFT_1014x720px.png",
ctaText: "Get NFT",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
authRequests: [
Expand All @@ -44,6 +45,7 @@ export const theMergeContributorsConfigMain: SpaceConfig = {
tags: ["Event"],
image: "EthCCtickets_1014x720px.png",
ctaText: "Register to get tickets",
createdAt: new Date("2022-07-01T00:00:00.000Z"),
},
sismoConnectRequest: {
appId: "0x0f38b4eb4d51fbd7906c9c7574df075e",
Expand Down
7 changes: 6 additions & 1 deletion space-config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type SpaceConfig = {
type: SocialType;
link: string;
}[];
tags?: string[];
};
apps?: AppConfig[];
options?: {
Expand All @@ -37,6 +38,8 @@ type AppCommonConfig = {
image: string; // 550x390px can be an url or local file
tags: string[];
ctaText?: string;
createdAt: Date;
lastUpdateAt?: Date;
};
sismoConnectRequest: {
appId?: string;
Expand All @@ -48,9 +51,11 @@ type AppCommonConfig = {
startDate?: Date;
endDate?: Date;
disabled?: boolean; // default false
isFeatured?: boolean; // default false
};
};


export type ExternalAppTemplateConfig = {
link: string;
};
Expand Down Expand Up @@ -152,4 +157,4 @@ type InputCommon = {
helperText?: string; // 80 characters max
maxCharacter?: number;
isRequired?: boolean;
};
};
18 changes: 18 additions & 0 deletions src/app/(home)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use client";

import React from "react";
import Hero from "@/src/components/Hero";

type Props = {
children: React.ReactNode;
};

export default function ExploreLayout({ children }: Props) {

return (
<>
<Hero/>
{children}
</>
);
}
Loading

0 comments on commit a3a42a3

Please sign in to comment.