diff --git a/src/App.js b/src/App.js index a1b114ed..09c92402 100644 --- a/src/App.js +++ b/src/App.js @@ -163,15 +163,15 @@ export default function App() { /> } /> - }> + }> } /> } /> - }> + }> } /> } /> - }> + }> } /> } /> diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index 846aeb7a..09da150d 100644 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -97,7 +97,7 @@ const Board = () => { if (challengeVerification.challengeSuccess === true) { setSuccessMessage('challenge success', {publishedCid: challengeVerification.publication.cid}); setSelectedThread(challengeVerification.publication.cid); - navigate(`/${selectedAddress}/thread/${challengeVerification.publication.cid}`); + navigate(`/p/${selectedAddress}/c/${challengeVerification.publication.cid}`); } else if (challengeVerification.challengeSuccess === false) { setErrorMessage('challenge failed', {reason: challengeVerification.reason, errors: challengeVerification.errors}); @@ -191,7 +191,7 @@ const Board = () => { const selectedTitle = defaultSubplebbits.find((subplebbit) => subplebbit.address === selected).title; setSelectedTitle(selectedTitle); setSelectedAddress(selected); - navigate(`/${selected}`); + navigate(`/p/${selected}`); }; // scroll to post when quote is clicked @@ -225,14 +225,14 @@ const Board = () => { {defaultSubplebbits.map(subplebbit => ( [ - handleClickTitle(subplebbit.title, subplebbit.address)} + handleClickTitle(subplebbit.title, subplebbit.address)} >{subplebbit.title ? subplebbit.title : subplebbit.address} ]  ))} [ - setIsSettingsOpen(true)}>Settings + setIsSettingsOpen(true)}>Settings ] [ handleStyleChange({target: {value: "Yotsuba"}} @@ -251,7 +251,7 @@ const Board = () => {
- setIsSettingsOpen(true)}>Settings + setIsSettingsOpen(true)}>Settings   handleStyleChange({target: {value: "Yotsuba"}} )}>Home @@ -336,7 +336,7 @@ const Board = () => {
[ - Catalog + Catalog ]
@@ -344,7 +344,7 @@ const Board = () => {
- Catalog + Catalog
@@ -447,7 +447,7 @@ const Board = () => {     [ - setSelectedThread(thread.cid)} className="reply-link" >Reply + setSelectedThread(thread.cid)} className="reply-link" >Reply ]   @@ -475,7 +475,7 @@ const Board = () => { (...)

Post too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view.
@@ -491,7 +491,7 @@ const Board = () => { {omittedCount} post{omittedCount > 1 ? "s" : ""} omitted. Click  - setSelectedThread(thread.cid)} className="ttl-link">here + setSelectedThread(thread.cid)} className="ttl-link">here  to view. ) : null} @@ -608,7 +608,7 @@ const Board = () => { (...)

Comment too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view.
@@ -718,7 +718,7 @@ const Board = () => { (...)

Post too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view.
@@ -729,7 +729,7 @@ const Board = () => {
{thread.replyCount} Replies - setSelectedThread(thread.cid)} className="button-mobile" >View Thread + setSelectedThread(thread.cid)} className="button-mobile" >View Thread
{renderedComments.map((reply) => { @@ -814,7 +814,7 @@ const Board = () => { (...)

Comment too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view.
diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index fdd64cb4..a130cfed 100644 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -165,7 +165,7 @@ const Catalog = () => { const selectedTitle = defaultSubplebbits.find((subplebbit) => subplebbit.address === selected).title; setSelectedTitle(selectedTitle); setSelectedAddress(selected); - navigate(`/${selected}`); + navigate(`/p/${selected}`); }; @@ -184,7 +184,7 @@ const Catalog = () => { {defaultSubplebbits.map(subplebbit => ( [ - { setSelectedTitle(subplebbit.title); setSelectedAddress(subplebbit.address); @@ -195,7 +195,7 @@ const Catalog = () => { ))} [ - setIsSettingsOpen(true)}>Settings + setIsSettingsOpen(true)}>Settings ] [ handleStyleChange({target: {value: "Yotsuba"}} @@ -214,7 +214,7 @@ const Catalog = () => {
- setIsSettingsOpen(true)}>Settings + setIsSettingsOpen(true)}>Settings   handleStyleChange({target: {value: "Yotsuba"}} )}>Home @@ -299,12 +299,12 @@ const Catalog = () => {
[ - Return + Return ]
- Return + Return
@@ -325,7 +325,7 @@ const Catalog = () => { const commentMediaInfo = getCommentMediaInfo(thread); const fallbackImgUrl = "/assets/filedeleted-res.gif"; return ( - setSelectedThread(thread.cid)}> + setSelectedThread(thread.cid)}>
{commentMediaInfo?.url ? ( diff --git a/src/components/views/Home.jsx b/src/components/views/Home.jsx index e6757292..b439814b 100644 --- a/src/components/views/Home.jsx +++ b/src/components/views/Home.jsx @@ -45,7 +45,7 @@ const Home = () => { const address = inputRef.current.value; if (address) { setSelectedAddress(address); - navigate(`/${address}`) + navigate(`/p/${address}`) } } }} /> @@ -54,7 +54,7 @@ const Home = () => { const address = inputRef.current.value; if (address) { setSelectedAddress(address); - navigate(`/${address}`) + navigate(`/p/${address}`) } } } /> @@ -81,7 +81,7 @@ const Home = () => {
{subplebbit.title ? subplebbit.title :  }
- { + { setSelectedTitle(subplebbit.title); setSelectedAddress(subplebbit.address); }} > diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index fe4462f4..551e96ca 100644 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -169,7 +169,7 @@ const Thread = () => { const selectedTitle = defaultSubplebbits.find((subplebbit) => subplebbit.address === selected).title; setSelectedTitle(selectedTitle); setSelectedAddress(selected); - navigate(`/${selected}`); + navigate(`/p/${selected}`); }; @@ -205,7 +205,7 @@ const Thread = () => { [ { setSelectedTitle(subplebbit.title); setSelectedAddress(subplebbit.address); @@ -216,7 +216,7 @@ const Thread = () => { ))} [ - setIsSettingsOpen(true)}>Settings + setIsSettingsOpen(true)}>Settings ] [ handleStyleChange({target: {value: "Yotsuba"}} @@ -235,7 +235,7 @@ const Thread = () => {
- setIsSettingsOpen(true)}>Settings + setIsSettingsOpen(true)}>Settings   handleStyleChange({target: {value: "Yotsuba"}} )}>Home @@ -261,12 +261,12 @@ const Thread = () => {
- Return + Return
- Catalog + Catalog
@@ -330,12 +330,12 @@ const Thread = () => { [ - Return + Return ] [ - Catalog + Catalog ] @@ -738,12 +738,12 @@ const Thread = () => {
[ - Return + Return ] [ - Catalog + Catalog ] @@ -809,12 +809,12 @@ const Thread = () => {
- Return + Return
- Catalog + Catalog
diff --git a/src/hooks/stores/usePostingStore.js b/src/hooks/stores/usePostingStore.js deleted file mode 100644 index e69de29b..00000000 diff --git a/src/hooks/useClickForm.js b/src/hooks/useClickForm.js index 09b5285a..bc6917c4 100644 --- a/src/hooks/useClickForm.js +++ b/src/hooks/useClickForm.js @@ -16,13 +16,13 @@ const useClickForm = () => { if (location.pathname === "/") { navigate("/post"); } else if (location.pathname.endsWith("/catalog")) { - navigate(`/${subplebbitAddress}/catalog/post`); + navigate(`/p/${subplebbitAddress}/catalog/post`); } else if (location.pathname.endsWith("/thread")) { - navigate(`/${subplebbitAddress}/thread/post`); + navigate(`/p/${subplebbitAddress}/c/post`); } else if (threadCid) { - navigate(`/${subplebbitAddress}/thread/${threadCid}/post`); + navigate(`/p/${subplebbitAddress}/c/${threadCid}/post`); } else { - navigate(`/${subplebbitAddress}/post`); + navigate(`/p/${subplebbitAddress}/post`); } };