import React, { useEffect, useRef, useState } from 'react'; import { Helmet } from 'react-helmet-async'; import { useAccount, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import useGeneralStore from '../../hooks/stores/useGeneralStore'; import { Link, useNavigate } from 'react-router-dom'; import { Container, Header, Logo, Page, Search, About, AboutTitle, AboutContent, Boards, BoardsTitle, BoardsContent, Footer } from '../styled/Home.styled'; import packageJson from '../../../package.json' const {version} = packageJson const BoardAvatar = ({ address }) => { const [avatarUrl, setAvatarUrl] = useState('assets/plebchan.png'); const subplebbit = useSubplebbit({ subplebbitAddress: address }); useEffect(() => { if (subplebbit.suggested?.avatarUrl) { setAvatarUrl(subplebbit.suggested.avatarUrl); } }, [subplebbit.suggested?.avatarUrl, subplebbit]); return board logo; }; const Home = () => { const { setBodyStyle, defaultSubplebbits, setSelectedAddress, setSelectedStyle, setSelectedTitle } = useGeneralStore(state => state); const account = useAccount(); const inputRef = useRef(null); const navigate = useNavigate(); // prevent dark mode useEffect(() => { setBodyStyle({ background: "#ffe url(assets/fade.png) top repeat-x", color: "maroon", fontFamily: "Helvetica, Arial, sans-serif" }); setSelectedStyle("Yotsuba"); }, [setBodyStyle, setSelectedStyle]); return ( <> plebchan
plebchan
{ if (event.key === "Enter") { event.preventDefault(); const address = inputRef.current.value; if (address) { setSelectedAddress(address); navigate(`/p/${address}`) } } }} /> { const address = inputRef.current.value; if (address) { setSelectedAddress(address); navigate(`/p/${address}`) } } } />

What is plebchan?

Plebchan is a serverless, adminless, decentralized 4chan alternative that uses the plebbit protocol. Users do not need to register an account before participating in the community; anyone can post comments, share media links, and . Search for any board address above, or feel free to click on a popular board below that interests you and jump right in!


There are no global rules, each board is completely independent and its owner decides how it should be moderated.

{account?.subscriptions?.length > 0 ? (

Board Subscriptions

You have subscribed to {account?.subscriptions?.length} board{account?.subscriptions?.length > 1 ? "s" : null}

  {/* [view all] */}
{account?.subscriptions?.map((subscription, index) => ( <>
{subscription}
))}
) : null}

Popular Boards

{defaultSubplebbits.map(subplebbit => (
{subplebbit.title ? subplebbit.title :  }
{ setSelectedTitle(subplebbit.title); setSelectedAddress(subplebbit.address); }} >
{subplebbit.address}
))}
plebchan v{version}. GPL-2.0
) }; export default Home;