From aa328228ccecb405cdd24d489ccd641a477f053c Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 21 Oct 2023 05:11:05 +0000 Subject: [PATCH] revert: Revert "fix: Empty div keep its padding caused a big gap" This reverts commit 57f7ffe0c8ea82b9b7315bcf4818044606f967e7. --- src/soapbox/components/scrollable-list.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/soapbox/components/scrollable-list.tsx b/src/soapbox/components/scrollable-list.tsx index fb2c8445f..78fb7f036 100644 --- a/src/soapbox/components/scrollable-list.tsx +++ b/src/soapbox/components/scrollable-list.tsx @@ -24,13 +24,9 @@ type SavedScrollPosition = { // NOTE: It's crucial to space lists with **padding** instead of margin! // Pass an `itemClassName` like `pb-3`, NOT a `space-y-3` className // https://virtuoso.dev/troubleshooting#list-does-not-scroll-to-the-bottom--items-jump-around -const Item: Components['Item'] = ({ context, ...rest }) => { - // TODO: 12 is a magic number for assumed empty data, not sure any other way to check null component - if (rest['data-known-size'] <= 12) return null; - return ( -
- ); -}; +const Item: Components['Item'] = ({ context, ...rest }) => ( +
+); /** Custom Virtuoso List component for the outer container. */ // Ensure the className winds up here