mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix home key values
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useRef } from 'react';
|
import React, { Fragment, useEffect, useRef } from 'react';
|
||||||
import { Helmet } from 'react-helmet-async';
|
import { Helmet } from 'react-helmet-async';
|
||||||
import { useAccount } from '@plebbit/plebbit-react-hooks';
|
import { useAccount } from '@plebbit/plebbit-react-hooks';
|
||||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||||
@@ -114,7 +114,7 @@ const Home = () => {
|
|||||||
<Link to="/p/subscriptions" id="view-all" onClick={()=> {window.scrollTo(0, 0)}}>[view all]</Link>
|
<Link to="/p/subscriptions" id="view-all" onClick={()=> {window.scrollTo(0, 0)}}>[view all]</Link>
|
||||||
<br />
|
<br />
|
||||||
{account?.subscriptions?.map((subscription, index) => (
|
{account?.subscriptions?.map((subscription, index) => (
|
||||||
<>
|
<Fragment key={`frag-${index}`}>
|
||||||
<Link key={`sub-${index}`} className="boardlink"
|
<Link key={`sub-${index}`} className="boardlink"
|
||||||
onClick={()=> {window.scrollTo(0, 0)}}
|
onClick={()=> {window.scrollTo(0, 0)}}
|
||||||
to={`/p/${subscription}`}>
|
to={`/p/${subscription}`}>
|
||||||
@@ -122,11 +122,12 @@ const Home = () => {
|
|||||||
{subscription}
|
{subscription}
|
||||||
</Link>
|
</Link>
|
||||||
<OfflineIndicator
|
<OfflineIndicator
|
||||||
|
key={`offline-${index}`}
|
||||||
address={subscription}
|
address={subscription}
|
||||||
className="disconnected"
|
className="disconnected"
|
||||||
tooltipPlace="top" />
|
tooltipPlace="top" />
|
||||||
<br />
|
<br key={`br-${index}`} />
|
||||||
</>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
<br id="mobile-br" />
|
<br id="mobile-br" />
|
||||||
</BoardsContent>
|
</BoardsContent>
|
||||||
@@ -137,26 +138,27 @@ const Home = () => {
|
|||||||
<h2>Popular Boards</h2>
|
<h2>Popular Boards</h2>
|
||||||
</BoardsTitle>
|
</BoardsTitle>
|
||||||
<BoardsContent>
|
<BoardsContent>
|
||||||
{defaultSubplebbits.map(subplebbit => (
|
{defaultSubplebbits.map((subplebbit, index) => (
|
||||||
<div className="board" key={subplebbit.address}>
|
<div className="board" key={`board-${index}`}>
|
||||||
<div className="board-title">
|
<div className="board-title" key="board-title">
|
||||||
{subplebbit.title ? subplebbit.title : <span style={{userSelect: "none"}}> </span>}
|
{subplebbit.title ? subplebbit.title : <span style={{userSelect: "none"}}> </span>}
|
||||||
</div>
|
</div>
|
||||||
<div className="board-avatar-container">
|
<div className="board-avatar-container" key="board-avatar-container">
|
||||||
<Link to={`/p/${subplebbit.address}`} onClick={() => {
|
<Link to={`/p/${subplebbit.address}`} key="link" onClick={() => {
|
||||||
setSelectedTitle(subplebbit.title);
|
setSelectedTitle(subplebbit.title);
|
||||||
setSelectedAddress(subplebbit.address);
|
setSelectedAddress(subplebbit.address);
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}} >
|
}} >
|
||||||
<BoardAvatar address={subplebbit.address} />
|
<BoardAvatar key="baordavatar" address={subplebbit.address} />
|
||||||
</Link>
|
</Link>
|
||||||
<OfflineIndicator
|
<OfflineIndicator
|
||||||
address={subplebbit.address}
|
address={subplebbit.address}
|
||||||
className="offline-indicator"
|
className="offline-indicator"
|
||||||
tooltipPlace="top" />
|
tooltipPlace="top"
|
||||||
|
key="oi2"/>
|
||||||
</div>
|
</div>
|
||||||
<div className="board-text">
|
<div className="board-text" key="bt">
|
||||||
<b>{subplebbit.address}</b>
|
<b key="b">{subplebbit.address}</b>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user