chore: fix various lint warnings

This commit is contained in:
plebeius
2025-12-26 17:30:55 +01:00
parent c9c9a8a78d
commit 756bff4b04
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ interface AuthorPrivilegesProps {
postCid?: string;
}
const useAuthorPrivileges = ({ commentAuthorAddress, subplebbitAddress, postCid }: AuthorPrivilegesProps) => {
const useAuthorPrivileges = ({ commentAuthorAddress, subplebbitAddress }: AuthorPrivilegesProps) => {
const account = useAccount();
const accountAuthorAddress = account?.author?.address;
const subplebbit = useSubplebbitsStore((state) => state.subplebbits[subplebbitAddress]);
+1 -1
View File
@@ -21,7 +21,7 @@ const useReplyModal = () => {
const getSelectedText = () => {
let text = document.getSelection()?.toString();
text && setSelectedText(`>${text}\n`);
if (text) setSelectedText(`>${text}\n`);
};
const openReplyModal = (parentCid: string, postCid: string, subplebbitAddress: string) => {
+2 -2
View File
@@ -18,7 +18,7 @@ const getClientHost = (clientUrl: string): string => {
if (!clientHosts[clientUrl]) {
try {
clientHosts[clientUrl] = new URL(clientUrl).hostname || clientUrl;
} catch (e) {
} catch {
clientHosts[clientUrl] = clientUrl;
}
}
@@ -120,7 +120,7 @@ export const useFeedStateString = (subplebbitAddresses?: string[]): string | und
}
// find all client urls
const clientHosts = new Set([...pagesStatesClientHosts]);
const clientHosts = new Set(pagesStatesClientHosts);
states['fetching-ipns']?.clientUrls.forEach((clientUrl) => clientHosts.add(getClientHost(clientUrl)));
states['fetching-ipfs']?.clientUrls.forEach((clientUrl) => clientHosts.add(getClientHost(clientUrl)));
+1 -1
View File
@@ -124,7 +124,7 @@ const useTimeFilter = () => {
} else if (timeFilterName) {
try {
timeFilterSeconds = convertTimeStringToSeconds(timeFilterName);
} catch (e) {
} catch {
console.error(`Invalid time filter format: ${timeFilterName}`);
timeFilterSeconds = undefined;
}