Skip to content

Commit

Permalink
removes SwarmCommentSystem from Home
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Ott committed Sep 16, 2024
1 parent e517265 commit 0b28796
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import NavigationFooter from "../../components/NavigationFooter/NavigationFooter
import HomeHeader from "../../components/HomeHeader/HomeHeader";
import HomeBackground from "../../assets/welcome-glass-effect.png";
import HomeLoading from "../../components/HomeLoading/HomeLoading";
import { SwarmCommentSystem } from "solarpunk-comment-system-ui";
import { ethers } from "ethers";
import { Signer, Utils } from "@ethersphere/bee-js";

interface HomePageProps {
isLoaded?: boolean;
Expand Down Expand Up @@ -90,23 +87,6 @@ const HomePage: React.FC<HomePageProps> = ({ isLoaded }) => {
return () => clearTimeout(timer);
}, []);

// Create Wallet - this will be created outside the component
let wallet: ethers.Wallet | null;
const savedKey = localStorage.getItem("walletPrivKey");
if (savedKey) {
wallet = new ethers.Wallet(savedKey)
} else {
const tempPriv = ethers.Wallet.createRandom().privateKey;
wallet = new ethers.Wallet(tempPriv);
localStorage.setItem("walletPrivKey", wallet.privateKey)
}

const signer: Signer = {
address: Utils.hexToBytes(wallet.address.slice(2)),
sign: async (data: any) => {
return await wallet.signMessage(data);
},
};

return (
<div className="home-page">
Expand All @@ -120,14 +100,6 @@ const HomePage: React.FC<HomePageProps> = ({ isLoaded }) => {
<HomeLoading />
) : (
<div className="home-page__content">
<SwarmCommentSystem
stamp={"9d976f24b0956280dd62eaa050e97d2b7adae9a04f6e5921bbc56f5bb0bc1f69"}
topic={"bagoytopic-3"}
privateKey={wallet.privateKey}
signer={signer}
beeApiUrl={"http://161.97.125.121:1733"}
/>

<DevConMainBox
title="Devcon buzz space"
content="Share your tought, chat with anybody without moderation and collect the reward."
Expand Down

0 comments on commit 0b28796

Please sign in to comment.