mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(package.json): upgrade plebbit-react-hooks
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/app": "6.0.1",
|
"@capacitor/app": "6.0.1",
|
||||||
"@floating-ui/react": "0.26.1",
|
"@floating-ui/react": "0.26.1",
|
||||||
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#6d35eb3b4dc84f8fdcbb46d95e3b1d78f1750b5f",
|
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#54cf36c50dd31f5641a9475f5566b7b29b3873c7",
|
||||||
"@react-spring/web": "9.7.5",
|
"@react-spring/web": "9.7.5",
|
||||||
"@testing-library/jest-dom": "5.14.1",
|
"@testing-library/jest-dom": "5.14.1",
|
||||||
"@testing-library/react": "13.0.0",
|
"@testing-library/react": "13.0.0",
|
||||||
|
|||||||
+13
-10
@@ -20,13 +20,16 @@ import { Post } from '../post';
|
|||||||
|
|
||||||
const lastVirtuosoStates: { [key: string]: StateSnapshot } = {};
|
const lastVirtuosoStates: { [key: string]: StateSnapshot } = {};
|
||||||
|
|
||||||
const threadsWithoutImagesFilter = (comment: Comment) => {
|
const createThreadsWithoutImagesFilter = () => ({
|
||||||
const { link, linkHeight, linkWidth, thumbnailUrl } = comment || {};
|
filter: (comment: Comment) => {
|
||||||
if (!getHasThumbnail(getCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight), link)) {
|
const { link, linkHeight, linkWidth, thumbnailUrl } = comment || {};
|
||||||
return false;
|
if (!getHasThumbnail(getCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight), link)) {
|
||||||
}
|
return false;
|
||||||
return true;
|
}
|
||||||
};
|
return true;
|
||||||
|
},
|
||||||
|
key: 'threads-with-images-only',
|
||||||
|
});
|
||||||
|
|
||||||
const Board = () => {
|
const Board = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -66,7 +69,7 @@ const Board = () => {
|
|||||||
sortType,
|
sortType,
|
||||||
postsPerPage: isInAllView || isInSubscriptionsView || isInModView ? 5 : 25,
|
postsPerPage: isInAllView || isInSubscriptionsView || isInModView ? 5 : 25,
|
||||||
...(isInAllView || isInSubscriptionsView || isInModView ? { newerThan: timeFilterSeconds } : {}),
|
...(isInAllView || isInSubscriptionsView || isInModView ? { newerThan: timeFilterSeconds } : {}),
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
filter: hideThreadsWithoutImages ? createThreadsWithoutImagesFilter() : undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { feed, hasMore, loadMore, reset, subplebbitAddressesWithNewerPosts } = useFeed(feedOptions);
|
const { feed, hasMore, loadMore, reset, subplebbitAddressesWithNewerPosts } = useFeed(feedOptions);
|
||||||
@@ -134,13 +137,13 @@ const Board = () => {
|
|||||||
subplebbitAddresses,
|
subplebbitAddresses,
|
||||||
sortType,
|
sortType,
|
||||||
newerThan: 60 * 60 * 24 * 7,
|
newerThan: 60 * 60 * 24 * 7,
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
filter: hideThreadsWithoutImages ? createThreadsWithoutImagesFilter() : undefined,
|
||||||
});
|
});
|
||||||
const { feed: monthlyFeed } = useFeed({
|
const { feed: monthlyFeed } = useFeed({
|
||||||
subplebbitAddresses,
|
subplebbitAddresses,
|
||||||
sortType,
|
sortType,
|
||||||
newerThan: 60 * 60 * 24 * 30,
|
newerThan: 60 * 60 * 24 * 30,
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
filter: hideThreadsWithoutImages ? createThreadsWithoutImagesFilter() : undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
const feedLength = feed.length;
|
const feedLength = feed.length;
|
||||||
|
|||||||
@@ -20,13 +20,16 @@ import styles from './catalog.module.css';
|
|||||||
|
|
||||||
const lastVirtuosoStates: { [key: string]: StateSnapshot } = {};
|
const lastVirtuosoStates: { [key: string]: StateSnapshot } = {};
|
||||||
|
|
||||||
const threadsWithoutImagesFilter = (comment: Comment) => {
|
const createThreadsWithoutImagesFilter = () => ({
|
||||||
const { link, linkHeight, linkWidth, thumbnailUrl } = comment || {};
|
filter: (comment: Comment) => {
|
||||||
if (!getHasThumbnail(getCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight), link)) {
|
const { link, linkHeight, linkWidth, thumbnailUrl } = comment || {};
|
||||||
return false;
|
if (!getHasThumbnail(getCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight), link)) {
|
||||||
}
|
return false;
|
||||||
return true;
|
}
|
||||||
};
|
return true;
|
||||||
|
},
|
||||||
|
key: 'threads-with-images-only',
|
||||||
|
});
|
||||||
|
|
||||||
const Catalog = () => {
|
const Catalog = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -79,7 +82,7 @@ const Catalog = () => {
|
|||||||
subplebbitAddresses,
|
subplebbitAddresses,
|
||||||
sortType,
|
sortType,
|
||||||
postsPerPage: isInAllView || isInSubscriptionsView ? 10 : postsPerPage,
|
postsPerPage: isInAllView || isInSubscriptionsView ? 10 : postsPerPage,
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
filter: hideThreadsWithoutImages ? createThreadsWithoutImagesFilter() : undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isInAllView || isInSubscriptionsView) {
|
if (isInAllView || isInSubscriptionsView) {
|
||||||
@@ -143,13 +146,13 @@ const Catalog = () => {
|
|||||||
subplebbitAddresses,
|
subplebbitAddresses,
|
||||||
sortType,
|
sortType,
|
||||||
newerThan: 60 * 60 * 24 * 7,
|
newerThan: 60 * 60 * 24 * 7,
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
filter: hideThreadsWithoutImages ? createThreadsWithoutImagesFilter() : undefined,
|
||||||
});
|
});
|
||||||
const { feed: monthlyFeed } = useFeed({
|
const { feed: monthlyFeed } = useFeed({
|
||||||
subplebbitAddresses,
|
subplebbitAddresses,
|
||||||
sortType,
|
sortType,
|
||||||
newerThan: 60 * 60 * 24 * 30,
|
newerThan: 60 * 60 * 24 * 30,
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
filter: hideThreadsWithoutImages ? createThreadsWithoutImagesFilter() : undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [showMorePostsSuggestion, setShowMorePostsSuggestion] = useState(false);
|
const [showMorePostsSuggestion, setShowMorePostsSuggestion] = useState(false);
|
||||||
|
|||||||
@@ -3069,6 +3069,22 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
debug "4.3.4"
|
debug "4.3.4"
|
||||||
|
|
||||||
|
"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#54cf36c50dd31f5641a9475f5566b7b29b3873c7":
|
||||||
|
version "0.0.1"
|
||||||
|
resolved "https://github.com/plebbit/plebbit-react-hooks.git#54cf36c50dd31f5641a9475f5566b7b29b3873c7"
|
||||||
|
dependencies:
|
||||||
|
"@plebbit/plebbit-js" "https://github.com/plebbit/plebbit-js.git#5ff48e9b9a906a098a51b474a52692eebfb6561d"
|
||||||
|
"@plebbit/plebbit-logger" "https://github.com/plebbit/plebbit-logger.git"
|
||||||
|
assert "2.0.0"
|
||||||
|
ethers "5.6.9"
|
||||||
|
localforage "1.10.0"
|
||||||
|
lodash.isequal "4.5.0"
|
||||||
|
memoizee "0.4.15"
|
||||||
|
quick-lru "5.1.1"
|
||||||
|
uint8arrays "3.1.1"
|
||||||
|
uuid "8.3.2"
|
||||||
|
zustand "4.0.0"
|
||||||
|
|
||||||
"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#6d35eb3b4dc84f8fdcbb46d95e3b1d78f1750b5f":
|
"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#6d35eb3b4dc84f8fdcbb46d95e3b1d78f1750b5f":
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://github.com/plebbit/plebbit-react-hooks.git#6d35eb3b4dc84f8fdcbb46d95e3b1d78f1750b5f"
|
resolved "https://github.com/plebbit/plebbit-react-hooks.git#6d35eb3b4dc84f8fdcbb46d95e3b1d78f1750b5f"
|
||||||
@@ -3976,6 +3992,21 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@typescript-eslint/eslint-plugin@8.26.0":
|
||||||
|
version "8.26.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.0.tgz#7e880faf91f89471c30c141951e15f0eb3a0599e"
|
||||||
|
integrity sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==
|
||||||
|
dependencies:
|
||||||
|
"@eslint-community/regexpp" "^4.10.0"
|
||||||
|
"@typescript-eslint/scope-manager" "8.26.0"
|
||||||
|
"@typescript-eslint/type-utils" "8.26.0"
|
||||||
|
"@typescript-eslint/utils" "8.26.0"
|
||||||
|
"@typescript-eslint/visitor-keys" "8.26.0"
|
||||||
|
graphemer "^1.4.0"
|
||||||
|
ignore "^5.3.1"
|
||||||
|
natural-compare "^1.4.0"
|
||||||
|
ts-api-utils "^2.0.1"
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^5.5.0":
|
"@typescript-eslint/eslint-plugin@^5.5.0":
|
||||||
version "5.62.0"
|
version "5.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
|
||||||
@@ -3992,21 +4023,6 @@
|
|||||||
semver "^7.3.7"
|
semver "^7.3.7"
|
||||||
tsutils "^3.21.0"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^8.26.0":
|
|
||||||
version "8.26.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.0.tgz#7e880faf91f89471c30c141951e15f0eb3a0599e"
|
|
||||||
integrity sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==
|
|
||||||
dependencies:
|
|
||||||
"@eslint-community/regexpp" "^4.10.0"
|
|
||||||
"@typescript-eslint/scope-manager" "8.26.0"
|
|
||||||
"@typescript-eslint/type-utils" "8.26.0"
|
|
||||||
"@typescript-eslint/utils" "8.26.0"
|
|
||||||
"@typescript-eslint/visitor-keys" "8.26.0"
|
|
||||||
graphemer "^1.4.0"
|
|
||||||
ignore "^5.3.1"
|
|
||||||
natural-compare "^1.4.0"
|
|
||||||
ts-api-utils "^2.0.1"
|
|
||||||
|
|
||||||
"@typescript-eslint/experimental-utils@^5.0.0":
|
"@typescript-eslint/experimental-utils@^5.0.0":
|
||||||
version "5.62.0"
|
version "5.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz#14559bf73383a308026b427a4a6129bae2146741"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz#14559bf73383a308026b427a4a6129bae2146741"
|
||||||
@@ -4014,6 +4030,17 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/utils" "5.62.0"
|
"@typescript-eslint/utils" "5.62.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/parser@8.26.0":
|
||||||
|
version "8.26.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.26.0.tgz#9b4d2198e89f64fb81e83167eedd89a827d843a9"
|
||||||
|
integrity sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/scope-manager" "8.26.0"
|
||||||
|
"@typescript-eslint/types" "8.26.0"
|
||||||
|
"@typescript-eslint/typescript-estree" "8.26.0"
|
||||||
|
"@typescript-eslint/visitor-keys" "8.26.0"
|
||||||
|
debug "^4.3.4"
|
||||||
|
|
||||||
"@typescript-eslint/parser@^5.5.0":
|
"@typescript-eslint/parser@^5.5.0":
|
||||||
version "5.62.0"
|
version "5.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7"
|
||||||
@@ -4024,17 +4051,6 @@
|
|||||||
"@typescript-eslint/typescript-estree" "5.62.0"
|
"@typescript-eslint/typescript-estree" "5.62.0"
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
|
|
||||||
"@typescript-eslint/parser@^8.26.0":
|
|
||||||
version "8.26.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.26.0.tgz#9b4d2198e89f64fb81e83167eedd89a827d843a9"
|
|
||||||
integrity sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==
|
|
||||||
dependencies:
|
|
||||||
"@typescript-eslint/scope-manager" "8.26.0"
|
|
||||||
"@typescript-eslint/types" "8.26.0"
|
|
||||||
"@typescript-eslint/typescript-estree" "8.26.0"
|
|
||||||
"@typescript-eslint/visitor-keys" "8.26.0"
|
|
||||||
debug "^4.3.4"
|
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@5.62.0":
|
"@typescript-eslint/scope-manager@5.62.0":
|
||||||
version "5.62.0"
|
version "5.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
|
||||||
|
|||||||
Reference in New Issue
Block a user