diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx
index e685109d..4fb4ca5b 100644
--- a/src/components/views/Board.jsx
+++ b/src/components/views/Board.jsx
@@ -377,12 +377,12 @@ const Board = () => {
diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx
index 166e4837..7e295462 100644
--- a/src/components/views/Catalog.jsx
+++ b/src/components/views/Catalog.jsx
@@ -292,12 +292,12 @@ const Catalog = () => {
diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx
index a697894a..16068b2a 100644
--- a/src/components/views/Thread.jsx
+++ b/src/components/views/Thread.jsx
@@ -349,12 +349,12 @@ const Thread = () => {
diff --git a/src/hooks/useClickForm.js b/src/hooks/useClickForm.js
index 94ce2048..3eec12b7 100644
--- a/src/hooks/useClickForm.js
+++ b/src/hooks/useClickForm.js
@@ -1,27 +1,11 @@
-import { useNavigate, useLocation } from "react-router-dom";
import useGeneralStore from "./stores/useGeneralStore";
const useClickForm = () => {
- const navigate = useNavigate();
- const location = useLocation();
const { setShowPostForm, setShowPostFormLink } = useGeneralStore.getState();
const handleClickForm = () => {
setShowPostForm(true);
setShowPostFormLink(false);
- const pathComponents = location.pathname.split("/");
- const subplebbitAddress = pathComponents[2];
- const threadCid = pathComponents[4];
-
- if (pathComponents[1] === "p") {
- if (pathComponents[3] === "c") {
- navigate(`/p/${subplebbitAddress}/c/${threadCid}/post`);
- } else if (pathComponents[3] === "catalog") {
- navigate(`/p/${subplebbitAddress}/catalog/post`);
- } else {
- navigate(`/p/${subplebbitAddress}/post`);
- }
- }
};
return handleClickForm;