added HashRouter, disabled hrefs

This commit is contained in:
plebbitor
2023-02-10 12:57:17 +01:00
parent 42a93a5caa
commit 70162cb42f
4 changed files with 16 additions and 16 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

+11 -11
View File
@@ -136,7 +136,7 @@ const Board = ({ setBodyStyle }) => {
<PostForm selectedStyle={selectedStyle} name="post" action="" method="post" enctype="multipart/form-data"> <PostForm selectedStyle={selectedStyle} name="post" action="" method="post" enctype="multipart/form-data">
<div id="post-form-link"> <div id="post-form-link">
[ [
<a href="#">Start a New Thread</a> <a href="javascript:void(0)">Start a New Thread</a>
] ]
</div> </div>
<table id="post-form"></table> <table id="post-form"></table>
@@ -165,7 +165,7 @@ const Board = ({ setBodyStyle }) => {
return ( return (
<> <>
<div key={`t-${thread.cid}`} className="thread"> <div key={`t-${thread.cid}`} className="thread">
<div key={`c-${thread.pc}`} className="post-container op-container"> <div key={`c-${thread.cid}`} className="post-container op-container">
<div key={`po-${thread.cid}`} className="post op"> <div key={`po-${thread.cid}`} className="post op">
<div key={`pi-${thread.cid}`} className="post-info"> <div key={`pi-${thread.cid}`} className="post-info">
&nbsp; &nbsp;
@@ -180,22 +180,22 @@ const Board = ({ setBodyStyle }) => {
<span key={`dt-${thread.cid}`} className="date-time" data-utc="data">2 weeks ago</span> <span key={`dt-${thread.cid}`} className="date-time" data-utc="data">2 weeks ago</span>
&nbsp; &nbsp;
<span key={`pn-${thread.cid}`} className="post-number"> <span key={`pn-${thread.cid}`} className="post-number">
<a key={`pl1-${thread.cid}`} href="post-link" title="Link to this post">No.</a> <a key={`pl1-${thread.cid}`} href="javascript:void(0)" title="Link to this post">No.</a>
<a key={`pl2-${thread.cid}`} href="post-link" title="Reply to this post">00000001</a> <a key={`pl2-${thread.cid}`} href="javascript:void(0)" title="Reply to this post">00000001</a>
&nbsp; &nbsp; &nbsp; &nbsp;
<span key={`rl1-${thread.cid}`}> <span key={`rl1-${thread.cid}`}>
[ [
<a key={`rl2-${thread.cid}`} className="reply-link" href="post-link">Reply</a> <a key={`rl2-${thread.cid}`} className="reply-link" href="javascript:void(0)">Reply</a>
] ]
</span> </span>
</span> </span>
<a key={`pmb-${thread.cid}`} className="post-menu-button" href="post-menu" title="Post menu" data-cmd="post-menu"></a> <a key={`pmb-${thread.cid}`} className="post-menu-button" href="javascript:void(0)" title="Post menu" data-cmd="post-menu"></a>
<div key={`bi-${thread.cid}`} id="backlink-id" className="backlink"> <div key={`bi-${thread.cid}`} id="backlink-id" className="backlink">
<span key={`ql1-${thread.cid}`}> <span key={`ql1-${thread.cid}`}>
<a key={`ql2-${thread.cid}`} className="quote-link" href="post-link">{'>>'}00000002</a> <a key={`ql2-${thread.cid}`} className="quote-link" href="javascript:void(0)">{'>>'}00000002</a>
</span> </span>
</div> </div>
<blockquote key={`t-${thread.cid}`}> <blockquote key={`bq-${thread.cid}`}>
<span key={`q-${thread.cid}`} className="quote"> <span key={`q-${thread.cid}`} className="quote">
{thread.title ? `>${thread.title}` : null} {thread.title ? `>${thread.title}` : null}
</span> </span>
@@ -222,10 +222,10 @@ const Board = ({ setBodyStyle }) => {
<span key={`dt-${reply.cid}`} className="date-time" data-utc="data">2 weeks ago</span> <span key={`dt-${reply.cid}`} className="date-time" data-utc="data">2 weeks ago</span>
&nbsp; &nbsp;
<span key={`pn-${reply.cid}`} className="post-number"> <span key={`pn-${reply.cid}`} className="post-number">
<a key={`pl1-${reply.cid}`} href="post-link" title="Link to this post">No.</a> <a key={`pl1-${reply.cid}`} href="javascript:void(0)" title="Link to this post">No.</a>
<a key={`pl2-${reply.cid}`} href="post-link" title="Reply to this post">00000002</a> <a key={`pl2-${reply.cid}`} href="javascript:void(0)" title="Reply to this post">00000002</a>
</span> </span>
<a key={`pmb-${reply.cid}`} className="post-menu-button" href="#" title="Post menu" data-cmd="post-menu"></a> <a key={`pmb-${reply.cid}`} className="post-menu-button" href="javascript:void(0)" title="Post menu" data-cmd="post-menu"></a>
</div> </div>
<blockquote key={`pm-${reply.cid}`} className="post-message"> <blockquote key={`pm-${reply.cid}`} className="post-message">
{reply.content} {reply.content}
+2 -2
View File
@@ -42,7 +42,7 @@ const Home = () => {
<Search> <Search>
<form> <form>
<input type="text" placeholder='"board.eth" or "Qm..."' /> <input type="text" placeholder='"board.eth" or "Qm..."' />
<input type="submit" value="Search" /> <input type="submit" value="Search" disabled />
</form> </form>
</Search> </Search>
<About> <About>
@@ -51,7 +51,7 @@ const Home = () => {
</AboutTitle> </AboutTitle>
<AboutContent> <AboutContent>
<div id="content"> <div id="content">
<p>Plebchan is a serverless, adminless, decentralized 4chan alternative that uses the <a href="https://plebbit.net" target="_blank" rel="noreferrer">plebbit protocol</a>. Users do not need to register an account before participating in the community; anyone can post comments, share image links, and create a board. Search for any board address above, or feel free to click on a popular board below that interests you and jump right in! </p> <p>Plebchan is a serverless, adminless, decentralized 4chan alternative that uses the <a href="https://plebbit.com" target="_blank" rel="noreferrer">plebbit protocol</a>. Users do not need to register an account before participating in the community; anyone can post comments, share image links, and create a board. Search for any board address above, or feel free to click on a popular board below that interests you and jump right in! </p>
<br /> <br />
<p>There are no global rules, each board is completely independent and their owners decide how they should be moderated.</p> <p>There are no global rules, each board is completely independent and their owners decide how they should be moderated.</p>
</div> </div>
+3 -3
View File
@@ -1,16 +1,16 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import App from './App'; import App from './App';
import { BrowserRouter } from 'react-router-dom';
import { HelmetProvider } from 'react-helmet-async'; import { HelmetProvider } from 'react-helmet-async';
import { HashRouter } from 'react-router-dom';
const root = ReactDOM.createRoot(document.getElementById('root')); const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<HelmetProvider> <HelmetProvider>
<BrowserRouter> <HashRouter>
<App /> <App />
</BrowserRouter> </HashRouter>
</HelmetProvider> </HelmetProvider>
</React.StrictMode> </React.StrictMode>
); );