diff --git a/src/App.js b/src/App.js
index 11a3daef..9f9a3625 100644
--- a/src/App.js
+++ b/src/App.js
@@ -125,7 +125,7 @@ export default function App() {
return () => {
darkModeMediaQuery.removeEventListener('change', darkModeListener);
};
- }, [isHomeRoute]);
+ }, [isHomeRoute, setBodyStyle, setSelectedStyle]);
// fetch default subplebbits
useEffect(() => {
@@ -143,7 +143,7 @@ export default function App() {
return () => {
didCancel = true;
};
- }, []);
+ }, [setDefaultSubplebbits]);
// handle nested routes
useEffect(() => {
@@ -162,7 +162,7 @@ export default function App() {
setIsSettingsOpen(false);
}
- }, [location.pathname]);
+ }, [location.pathname, setIsSettingsOpen, setShowPostForm, setShowPostFormLink]);
return (
diff --git a/src/components/Post.jsx b/src/components/Post.jsx
index 8ddb71f6..c9178fa1 100644
--- a/src/components/Post.jsx
+++ b/src/components/Post.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
-import { Link } from 'react-router-dom';
+// import { Link } from 'react-router-dom';
import rehypeSanitize from 'rehype-sanitize';
import breaks from 'remark-breaks';
@@ -28,28 +28,28 @@ const blockquoteToGreentext = () => (tree) => {
});
};
-const createQuotelink = (handlequoteclick, comment, children) => {
- const text = children.map((child) => (typeof child === 'string' ? child : child.props.children)).join('');
- const regex = /(\s|^)(c\/[A-Za-z0-9]{12}|c\/[A-Za-z0-9]{45})(?=\s|$)/g;
- const parts = text.split(regex);
+// const createQuotelink = (handlequoteclick, comment, children) => {
+// const text = children.map((child) => (typeof child === 'string' ? child : child.props.children)).join('');
+// const regex = /(\s|^)(c\/[A-Za-z0-9]{12}|c\/[A-Za-z0-9]{45})(?=\s|$)/g;
+// const parts = text.split(regex);
- return parts.flatMap((part, i) => {
- if (regex.test(part)) {
- return [
-
- {part.trim()}
- ,
- ];
- } else {
- return [part];
- }
- });
-};
+// return parts.flatMap((part, i) => {
+// if (regex.test(part)) {
+// return [
+//
+// {part.trim()}
+// ,
+// ];
+// } else {
+// return [part];
+// }
+// });
+// };
const Post = ({ content, handlequoteclick, comment }) => {
diff --git a/src/components/ReplyModal.jsx b/src/components/ReplyModal.jsx
index 4fa141df..9e3544f8 100644
--- a/src/components/ReplyModal.jsx
+++ b/src/components/ReplyModal.jsx
@@ -83,7 +83,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
if (index !== undefined) {
setPendingCommentIndex(index);
}
- }, [index, location]);
+ }, [index, location, setPendingCommentIndex]);
const resetFields = () => {
@@ -116,7 +116,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
closeModal();
})();
}
- }, [publishCommentOptions]);
+ }, [publishCommentOptions, closeModal, publishComment]);
const getChallengeAnswersFromUser = async (challenges) => {
diff --git a/src/components/styled/Board.styled.jsx b/src/components/styled/Board.styled.jsx
index 9398ff87..2a52a05b 100644
--- a/src/components/styled/Board.styled.jsx
+++ b/src/components/styled/Board.styled.jsx
@@ -220,7 +220,10 @@ export const NavBar = styled.div`
background-color: #ddd;
border-bottom: 2px solid #ccc;
}`;
- }
+
+ default:
+ return '';
+ }
}}`;
export const Header = styled.div`
@@ -410,7 +413,10 @@ export const Header = styled.div`
margin-top: 5px;
font-size: 9pt;
}`;
- }
+
+ default:
+ return '';
+ }
}}
`;
@@ -445,8 +451,11 @@ export const Break = styled.hr`
return `width: 90%;
border: none;
border-top: 1px solid #ddd;
- height: 0;`;
- }
+ height: 0;`;
+
+ default:
+ return '';
+ }
}}
`;
@@ -600,7 +609,9 @@ export const PostFormLink = styled.div`
color: #333 !important;
white-space: nowrap;
}`;
-
+
+ default:
+ return '';
}
}}
`;
@@ -1123,7 +1134,10 @@ export const PostFormTable = styled.table`
width: 100%
}
}`;
- }
+
+ default:
+ return '';
+ }
}}
#t-help {
@@ -1224,8 +1238,10 @@ export const PostForm = styled.div`
a:hover {
color: #ff3300;
}`;
-
- }
+
+ default:
+ return '';
+ }
}}
`;
@@ -1369,8 +1385,10 @@ export const TopBar = styled.div`
a:hover {
color: #ff3300;
}`;
-
- }
+
+ default:
+ return '';
+ }
}}
@media (min-width: 480px) {
@@ -1533,6 +1551,9 @@ export const TopBar = styled.div`
color: #333 !important;
white-space: nowrap;
}`;
+
+ default:
+ return '';
}
}}
`;
@@ -1598,8 +1619,10 @@ export const BoardForm = styled.div`
background-color: #ccc !important;
border: 1px solid #ccc !important;
}`;
-
- }
+
+ default:
+ return '';
+ }
}}
}
@@ -2873,8 +2896,10 @@ export const BoardForm = styled.div`
border-top: 1px solid #ddd;
height: 0;
}`;
-
- }
+
+ default:
+ return '';
+ }
}}
@media (max-width: 480px) {
@@ -2934,6 +2959,9 @@ export const BoardForm = styled.div`
return `.highlighted {
background-color: #ccc !important;
}`;
+
+ default:
+ return '';
}
}}
@@ -3635,6 +3663,9 @@ export const BoardForm = styled.div`
}
}
}`;
+
+ default:
+ return '';
}
}}
}
diff --git a/src/components/styled/CaptchaModal.styled.jsx b/src/components/styled/CaptchaModal.styled.jsx
index 2b30e05c..6a23701d 100644
--- a/src/components/styled/CaptchaModal.styled.jsx
+++ b/src/components/styled/CaptchaModal.styled.jsx
@@ -236,6 +236,9 @@ export const StyledModal = styled(Modal)`
span {
color: #333;
}`;
- }
+
+ default:
+ return '';
+ }
}}
`;
\ No newline at end of file
diff --git a/src/components/styled/ReplyModal.styled.jsx b/src/components/styled/ReplyModal.styled.jsx
index 4c6c086d..ca3dde3e 100644
--- a/src/components/styled/ReplyModal.styled.jsx
+++ b/src/components/styled/ReplyModal.styled.jsx
@@ -254,6 +254,9 @@ export const StyledModal = styled(Modal)`
span {
color: #000;
}`;
- }
+
+ default:
+ return '';
+ }
}}
`;
\ No newline at end of file
diff --git a/src/components/styled/SettingsModal.styled.jsx b/src/components/styled/SettingsModal.styled.jsx
index a70c47ae..5360553a 100644
--- a/src/components/styled/SettingsModal.styled.jsx
+++ b/src/components/styled/SettingsModal.styled.jsx
@@ -364,7 +364,9 @@ export const StyledModal = styled(Modal)`
color: #f30 !important;
}
}`;
-
- }
+
+ default:
+ return '';
+ }
}}
`;
\ No newline at end of file
diff --git a/src/components/styled/Thread.styled.jsx b/src/components/styled/Thread.styled.jsx
index 49c6389e..60e04acb 100644
--- a/src/components/styled/Thread.styled.jsx
+++ b/src/components/styled/Thread.styled.jsx
@@ -164,6 +164,9 @@ export const ReplyFormLink = styled.div`
color: #333 !important;
white-space: nowrap;
}`;
+
+ default:
+ return '';
}
}}
`;
@@ -386,7 +389,8 @@ export const TopBar = styled.div`
color: #ff3300 !important;
}
}`;
-
+ default:
+ return '';
}
}}
@@ -514,7 +518,9 @@ export const TopBar = styled.div`
color: #333 !important;
white-space: nowrap;
}`;
-
+
+ default:
+ return '';
}
}}
`;
@@ -678,7 +684,9 @@ export const BottomBar = styled.div`
padding-bottom: 5px;
padding-top: 5px;
}`;
-
+
+ default:
+ return '';
}
}}
`;
@@ -735,16 +743,17 @@ export const BoardForm = styled.div`
return `.highlighted {
background-color: #1d1d21 !important;
border: 1px solid #111 !important;
- }
-`;
+ }`;
case 'Photon':
return `.highlighted {
background-color: #ccc !important;
border: 1px solid #ccc !important;
}`;
-
- }
+
+ default:
+ return '';
+ }
}}
}
@@ -2018,7 +2027,9 @@ export const BoardForm = styled.div`
border-top: 1px solid #ddd;
height: 0;
}`;
-
+
+ default:
+ return '';
}
}}
@@ -2079,7 +2090,10 @@ export const BoardForm = styled.div`
return `.highlighted {
background-color: #ccc !important;
}`;
- }
+
+ default:
+ return '';
+ }
}}
${({ selectedStyle }) => {
@@ -2780,6 +2794,9 @@ export const BoardForm = styled.div`
}
}
}`;
+
+ default:
+ return '';
}
}}
}
@@ -2896,6 +2913,9 @@ export const Footer = styled.div`
color: #f30;
}
}`;
- }
+
+ default:
+ return '';
+ }
}}
`;
\ No newline at end of file
diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx
index 055473b7..44c0dff1 100644
--- a/src/components/views/Board.jsx
+++ b/src/components/views/Board.jsx
@@ -207,7 +207,7 @@ const Board = () => {
setPendingCommentIndex(index);
navigate(`/profile/c/${index}`);
}
- }, [index]);
+ }, [index, navigate, setPendingCommentIndex]);
const resetFields = () => {
@@ -240,7 +240,7 @@ const Board = () => {
resetFields();
})();
}
- }, [publishCommentOptions]);
+ }, [publishCommentOptions, publishComment]);
const getChallengeAnswersFromUser = async (challenges) => {
@@ -369,12 +369,12 @@ const Board = () => {
@@ -452,7 +452,6 @@ const Board = () => {
hasMore={hasMore}
>
{selectedFeed.map((thread) => {
- const { replies: { pages: { topAll: {} = {} } = {} } = {} } = thread;
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
const commentMediaInfo = getCommentMediaInfo(thread);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx
index 368a9b49..ee1f9640 100644
--- a/src/components/views/Catalog.jsx
+++ b/src/components/views/Catalog.jsx
@@ -133,7 +133,7 @@ const Catalog = () => {
setPendingCommentIndex(index);
navigate(`/profile/c/${index}`);
}
- }, [index]);
+ }, [index, navigate, setPendingCommentIndex]);
const resetFields = () => {
@@ -166,7 +166,7 @@ const Catalog = () => {
resetFields();
})();
}
- }, [publishCommentOptions]);
+ }, [publishCommentOptions, publishComment]);
const getChallengeAnswersFromUser = async (challenges) => {
@@ -284,12 +284,12 @@ const Catalog = () => {
diff --git a/src/components/views/Pending.jsx b/src/components/views/Pending.jsx
index b59f0d70..b279b89a 100644
--- a/src/components/views/Pending.jsx
+++ b/src/components/views/Pending.jsx
@@ -184,7 +184,8 @@ const Pending = () => {