= ({ title }) => {
+ useEffect(() => {
+ document.title = title;
+ }, [title]);
return (
<>
@@ -12,10 +20,12 @@ function Home() {
Verax Attestation Registry
- Verax is a shared registry for storing attestations of public interest on EVM chains,
designed to enhance
- data discoverability and consumption for dApps across the network.
+
+ Verax is a shared registry for storing attestations of public interest on EVM chains,
+
designed to enhance data discoverability and consumption for dApps across the network.{" "}
+
>
);
-}
+};
export default Home;
diff --git a/website/src/pages/Poh.tsx b/website/src/pages/Poh.tsx
index 3938355f..e6813f8c 100644
--- a/website/src/pages/Poh.tsx
+++ b/website/src/pages/Poh.tsx
@@ -1,3 +1,4 @@
+import type { FunctionComponent } from "react";
import { useEffect, useState } from "react";
import "./Poh.css";
import { ConnectKitButton } from "connectkit";
@@ -5,6 +6,10 @@ import axios from "axios";
import { useAccount } from "wagmi";
import { Link } from "react-router-dom";
+export type PohProps = {
+ title: string;
+};
+
type IssuerAttestation = {
validated: boolean;
issuerName: string;
@@ -20,7 +25,7 @@ type POHResponse = {
attestations: IssuerAttestation[];
};
-function Poh() {
+export const Poh: FunctionComponent = ({ title }) => {
const [pohGroupA, setPohGroupA] = useState();
const [pohGroupB, setPohGroupB] = useState();
const [isPoh, setIsPoh] = useState();
@@ -35,6 +40,10 @@ function Poh() {
setPohGroupB(undefined);
};
+ useEffect(() => {
+ document.title = title;
+ }, [title]);
+
useEffect(() => {
const getMyPoh = async () => {
const { data } = await axios.get(`https://linea-xp-poh-api.linea.build/poh/${address}`, {
@@ -116,6 +125,6 @@ function Poh() {
)}
>
);
-}
+};
export default Poh;
diff --git a/website/src/pages/SDKDemo.tsx b/website/src/pages/SDKDemo.tsx
index 339620cd..db2015f4 100644
--- a/website/src/pages/SDKDemo.tsx
+++ b/website/src/pages/SDKDemo.tsx
@@ -1,10 +1,14 @@
-import { useEffect, useState } from "react";
+import { type FunctionComponent, useEffect, useState } from "react";
import "./SDKDemo.css";
import { ConnectKitButton } from "connectkit";
import { Attestation, VeraxSdk } from "@verax-attestation-registry/verax-sdk";
import { useAccount, useNetwork } from "wagmi";
-function SDKDemo() {
+export type SDKDemoProps = {
+ title: string;
+};
+
+export const SDKDemo: FunctionComponent = ({ title }) => {
const [attestations, setAttestations] = useState([]);
const [attestationsCounter, setAttestationsCounter] = useState(0);
const [txHash, setTxHash] = useState("");
@@ -14,9 +18,14 @@ function SDKDemo() {
const { address, isConnected } = useAccount();
const { chain } = useNetwork();
+ useEffect(() => {
+ document.title = title;
+ }, [title]);
+
useEffect(() => {
if (chain && address) {
- const sdkConf = chain.id === 59144 ? VeraxSdk.DEFAULT_LINEA_MAINNET_FRONTEND : VeraxSdk.DEFAULT_LINEA_TESTNET_FRONTEND;
+ const sdkConf =
+ chain.id === 59144 ? VeraxSdk.DEFAULT_LINEA_MAINNET_FRONTEND : VeraxSdk.DEFAULT_LINEA_TESTNET_FRONTEND;
const sdk = new VeraxSdk(sdkConf, address);
setVeraxSdk(sdk);
}
@@ -67,7 +76,6 @@ function SDKDemo() {
}
};
-
return (
<>
Verax - SDK Demo
@@ -80,8 +88,9 @@ function SDKDemo() {
{attestations.length > 0 && (
<>
{attestations.map((attestation) => (
- ID = {shortenHexString(attestation.id)} - Subject = {shortenHexString(attestation.subject)}
+
+ ID = {shortenHexString(attestation.id)} - Subject = {shortenHexString(attestation.subject)}
+
))}
>
)}
@@ -93,12 +102,14 @@ function SDKDemo() {
-
+
{txHash !== "" &&
{`Transaction with hash ${txHash} sent!`}
}
{error !== "" &&
{error}
}
>
);
-}
+};
export default SDKDemo;