Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:indexnetwork/index into dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Feb 23, 2024
2 parents 23e77f9 + d2e2f81 commit a74224c
Show file tree
Hide file tree
Showing 36 changed files with 1,122 additions and 694 deletions.
1 change: 1 addition & 0 deletions .github/workflows/web-app-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Web App Build & Deploy
on:
push:
branches:
- mainnet
- testnet
- dev
paths:
Expand Down
1 change: 0 additions & 1 deletion api/lit_action.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// lit_actions/src/session.action.ts
var getCreatorConditions = (transform=true) => {
let conditionsArray = __REPLACE_THIS_AS_CONDITIONS_ARRAY__;

if(conditionsArray.length < 1){
return [];
}
Expand Down
6 changes: 3 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"@cosmjs/encoding": "^0.30.1",
"@elastic/elasticsearch": "^8.6.0",
"@ethersproject/keccak256": "^5.7.0",
"@lit-protocol/contracts-sdk": "3.1.4",
"@lit-protocol/lit-node-client-nodejs": "3.1.4",
"@lit-protocol/uint8arrays": "3.1.4",
"@lit-protocol/contracts-sdk": "3.2.1",
"@lit-protocol/lit-node-client-nodejs": "3.2.1",
"@lit-protocol/uint8arrays": "3.2.1",
"@mailchimp/mailchimp_marketing": "^3.0.80",
"@pinata/sdk": "^2.1.0",
"@sentry/node": "^7.101.1",
Expand Down
4 changes: 3 additions & 1 deletion api/src/controllers/lit-protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { getNftMetadataApi, getCollectionMetadataApi, getENSProfileByWallet } fr

const enrichConditions = async (conditions) => {


conditions = await Promise.all(conditions.map( async (c) => {

let { value, tag } = c;
Expand Down Expand Up @@ -123,12 +124,13 @@ export const getAction = async (req, res, next) => {
return res.json(enrichedConditions)
});

const litAction = await fetch(`https://indexas.infura-ipfs.io/ipfs/${cid}`);
const litAction = await fetch(`https://ipfs.index.network/ipfs/${cid}?pinataGatewayToken=${process.env.PINATA_IPFS_GATEWAY_KEY}`);
let litActionStr = await litAction.text();
litActionStr = `const ACTION_CALL_MODE="read"; ${litActionStr}`;
await runner.run(litActionStr);

} catch (err) {
console.log(err)
return res.json({"error": "No action found"});
}

Expand Down
1 change: 0 additions & 1 deletion api/src/libs/lit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ export const getPKPSession = async (session, index) => {
capacityDelegationAuthSig,
});


const signerFunctionV0 = CID.parse(index.signerFunction).toV0().toString();
const resp = await litNodeClient.executeJs({
ipfsId: signerFunctionV0,
Expand Down
6 changes: 3 additions & 3 deletions web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"@ethersproject/address": "^5.7.0",
"@ethersproject/keccak256": "^5.7.0",
"@ethersproject/providers": "^5.6.8",
"@lit-protocol/contracts-sdk": "3.1.2",
"@lit-protocol/lit-node-client": "^3.0.24",
"@lit-protocol/uint8arrays": "^2.2.47",
"@lit-protocol/contracts-sdk": "3.2.1",
"@lit-protocol/lit-node-client": "3.2.1",
"@lit-protocol/uint8arrays": "3.2.1",
"@nanostores/react": "ai/react",
"@radix-ui/react-alert-dialog": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.4",
Expand Down
Binary file modified web-app/public/images/bridge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web-app/public/images/ex-bridge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web-app/public/images/features/1.webp
Binary file not shown.
Binary file added web-app/public/images/features/2.webp
Binary file not shown.
Binary file added web-app/public/images/features/3.webp
Binary file not shown.
16 changes: 16 additions & 0 deletions web-app/public/images/logo-full-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions web-app/public/images/partners/ic_consensys.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 1 addition & 13 deletions web-app/src/app/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"use client";

// import LoadingSection from "@/components/sections/Loading";
import { useApp } from "@/context/AppContext";
import { DiscoveryType } from "@/types";
import DiscoveryLayout from "components/layout/site/DiscoveryLayout";
import IndexConversationSection from "components/sections/IndexConversation";
import UserConversationSection from "components/sections/UserConversation";
import { useRouteParams } from "hooks/useRouteParams";
import { useEffect } from "react";
// import "../../styles/main.scss";
import "../../styles/main.scss";

const Discovery = () => {
const { discoveryType, indexes } = useApp();
Expand All @@ -19,20 +18,9 @@ const Discovery = () => {
console.log("indexes in page.tsx:", indexes);
}, [id, discoveryType, indexes]);

// if (loading) {
// return (
// <DiscoveryLayout>
// <LoadingSection />
// </DiscoveryLayout>
// );
// }

return (
<DiscoveryLayout>
{/* {!discoveryType && <LoadingSection />} */}

{discoveryType === DiscoveryType.DID && <UserConversationSection />}

{discoveryType === DiscoveryType.INDEX && <IndexConversationSection />}
</DiscoveryLayout>
);
Expand Down
24 changes: 19 additions & 5 deletions web-app/src/app/_page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
"use client";

import HeroSection from "@/components/sections/landing/Hero";
import { AuthStatus, useAuth } from "@/context/AuthContext";
import Flex from "components/layout/base/Grid/Flex";
import AppHeader from "components/layout/site/AppHeader";
import LandingSection1 from "components/site/landing/LandingSection1";
import LandingSection1v2 from "components/site/landing/LandingSection1v2";
import LandingSection2 from "components/site/landing/LandingSection2";
import LandingSection3 from "components/site/landing/LandingSection3";
import LandingSection4 from "components/site/landing/LandingSection4";
import LandingSection5 from "components/site/landing/LandingSection5";
import LandingSection7 from "components/site/landing/LandingSection7";
import { useRouter } from "next/navigation";
import { useEffect } from "react";

Expand All @@ -17,10 +25,16 @@ const Landing = () => {
}, [status, session, router]);

return (
<div className="bg-mainDark text-primary font-primary">
<div className="bg-primary text-secondary h-12">header nav</div>
<HeroSection />
</div>
<Flex flexdirection="column" alignitems="center">
<AppHeader />
<LandingSection1 />
<LandingSection1v2 />
<LandingSection2 />
<LandingSection3 />
<LandingSection4 />
<LandingSection5 />
<LandingSection7 />
</Flex>
);
};
export default Landing;
17 changes: 10 additions & 7 deletions web-app/src/app/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@ export default function PageHead() {
return (
<Head>
<link rel="shortcut icon" href="/favicon-white.png" />
<title>
Index Network | The human bridge between context and content.
</title>
<title>Index Network | Composable Discovery Protocol</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="title"
content="Index Network | The human bridge between context and content."
content="Index Network | Composable Discovery Protocol"
/>
<meta
name="description"
content="Index allows to create truly personalised and autonomous
discovery experiences across the web."
/>
<meta name="description" content="Create composable discovery engines." />

<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://index.network" />
<meta
property="twitter:title"
content="Index Network | The human bridge between context and content."
content="Index Network | Composable Discovery Protocol"
/>
<meta
property="twitter:description"
content="Create composable discovery engines."
content="Index allows to create truly personalised and autonomous
discovery experiences across the web."
/>
<meta
property="twitter:image"
Expand Down
37 changes: 32 additions & 5 deletions web-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
import { AppLayout } from "components/layout/site/AppLayout";
import type { Metadata } from "next";
import type { Metadata, Viewport } from "next";
import { Inter } from "next/font/google";
// import "./globals.css";
import "../styles/main.scss";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Index Network | The human bridge between context and content.",
description: "Create composable discovery engines.",
metadataBase: new URL("https://index.network"),
title: "Index Network | Composable Discovery Protocol",
description:
"Index allows to create truly personalised and autonomous discovery experiences across the web",
referrer: "origin-when-cross-origin",
icons: [
{ rel: "shortcut icon", url: "/favicon-white.png" },
{ rel: "icon", url: "/favicon-white.png" },
{ rel: "apple-touch-icon", url: "/favicon-white.png" },
],
twitter: {
card: "summary_large_image",
creator: "@indexnetwork_",
site: "https://index.network",
title: "Index Network | Composable Discovery Protocol",
description:
"Index allows to create truly personalised and autonomous discovery experiences across the web.",
images: ["https://index.network/images/bridge.jpg"],
},
openGraph: {
title: "Index Network | Composable Discovery Protocol",
description:
"Index allows to create truly personalised and autonomous discovery experiences across the web.",
url: "https://index.network",
images: "https://index.network/images/bridge.jpg",
},
};

export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
};

export default function RootLayout({
Expand Down
38 changes: 20 additions & 18 deletions web-app/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"use client";

import AppHeader from "@/components/new/AppHeader";
import FeatureSection1 from "@/components/sections/landing/Feature1";
import FeatureSection2 from "@/components/sections/landing/Feature2";
import FeatureSection3 from "@/components/sections/landing/Feature3";
import FooterSection from "@/components/sections/landing/Footer";
import HeroSection from "@/components/sections/landing/Hero";
import PartnersSection from "@/components/sections/landing/Partners";
import SubscribeSection from "@/components/sections/landing/Subscribe";
import { AuthStatus, useAuth } from "@/context/AuthContext";
import Flex from "components/layout/base/Grid/Flex";
import AppHeader from "components/layout/site/AppHeader";
import LandingSection1 from "components/site/landing/LandingSection1";
import LandingSection1v2 from "components/site/landing/LandingSection1v2";
import LandingSection2 from "components/site/landing/LandingSection2";
import LandingSection3 from "components/site/landing/LandingSection3";
import LandingSection4 from "components/site/landing/LandingSection4";
import LandingSection5 from "components/site/landing/LandingSection5";
import LandingSection7 from "components/site/landing/LandingSection7";
import { useRouter } from "next/navigation";
import { useEffect } from "react";
import "./globals.css";

const Landing = () => {
const router = useRouter();
Expand All @@ -25,16 +25,18 @@ const Landing = () => {
}, [status, session, router]);

return (
<Flex flexdirection="column" alignitems="center">
<div className="bg-mainDark text-primary font-primary min-h-screen">
<AppHeader />
<LandingSection1 />
<LandingSection1v2 />
<LandingSection2 />
<LandingSection3 />
<LandingSection4 />
<LandingSection5 />
<LandingSection7 />
</Flex>
<HeroSection />
<PartnersSection />
<div className="mb-16 flex flex-col gap-24 md:mb-32 md:gap-48">
<FeatureSection1 />
<FeatureSection2 />
<FeatureSection3 />
</div>
<SubscribeSection />
<FooterSection />
</div>
);
};
export default Landing;
Loading

0 comments on commit a74224c

Please sign in to comment.