Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@react-navigation/elements": "^2.4.0",
"@react-navigation/native": "^7.1.6",
"@react-navigation/stack": "^7.3.0",
"@shopify/flash-list": "1.7.6",
"@shopify/flash-list": "^2.0.0",
"@tanstack/react-query": "^5.75.2",
"axios": "^1.9.0",
"date-fns": "^4.1.0",
Expand Down
1 change: 0 additions & 1 deletion src/components/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export function List<ItemProps>({
paddingHorizontal: theme.space.marginList,
}}
data={dataFormatted}
estimatedItemSize={itemSize}
horizontal
ItemSeparatorComponent={renderSeparators}
keyExtractor={(_, index: number) =>
Expand Down
5 changes: 3 additions & 2 deletions src/components/VerticalList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ export function VerticalList<ItemProps>({
<AnimatedFlashList
bounces={false}
contentContainerStyle={{
...contentContainerStyle,
...(typeof contentContainerStyle === 'object' && contentContainerStyle
? contentContainerStyle
: {}),
Comment on lines +83 to +85
Copy link
Preview

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The null safety check is overly complex. Since contentContainerStyle is likely typed as an optional object, a simpler check like ...(contentContainerStyle || {}) would be more readable and achieve the same result.

Suggested change
...(typeof contentContainerStyle === 'object' && contentContainerStyle
? contentContainerStyle
: {}),
...(contentContainerStyle || {}),

Copilot uses AI. Check for mistakes.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working

paddingLeft: theme.space.marginList,
paddingRight: theme.space.marginList - gap,
}}
data={dataFormatted}
estimatedItemSize={itemSize / (3 / 4)}
keyExtractor={(_, index: number) => (isLoading ? `loading_${id}_${index}` : `${id}_${index}`)}
ListHeaderComponent={renderListHeaderComponent}
numColumns={numColumns}
Expand Down
11 changes: 6 additions & 5 deletions src/components/app/index/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ export function Overview() {
.flat()
.slice(0, 5)

const itemSize = Dimensions.get('window').width

const onViewableItemsChanged = React.useCallback(
({ viewableItems }: { viewableItems: ViewToken[] }) => {
({
viewableItems,
}: {
viewableItems: ViewToken<UseGetTrendingApiResponse['all']['results'][number]>[]
}) => {
const active = viewableItems?.[0]?.index

if (active || active === 0) {
Expand All @@ -46,7 +48,7 @@ export function Overview() {
item: { backdrop_path, id, media_type, name, overview, title },
}) => {
return (
<View style={{ width: itemSize }}>
<View style={{ width: Dimensions.get('window').width }}>
<Item
description={overview}
id={id}
Expand Down Expand Up @@ -111,7 +113,6 @@ export function Overview() {
<AnimatedFlashList
bounces={false}
data={results}
estimatedItemSize={itemSize}
horizontal
keyExtractor={(item, index) =>
isLoading ? `loading_${index}_overview` : `${index}_${item.id}_overview`
Expand Down
27 changes: 6 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2246,12 +2246,11 @@
resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==

"@shopify/flash-list@1.7.6":
version "1.7.6"
resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-1.7.6.tgz#367e76866c71d1f1be0ff70f0b28be4bbfbcf595"
integrity sha512-0kuuAbWgy4YSlN05mt0ScvxK8uiDixMsICWvDed+LTxvZ5+5iRyt3M8cRLUroB8sfiZlJJZWlxHrx0frBpsYOQ==
"@shopify/flash-list@^2.0.0":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-2.0.2.tgz#644748f883fccf8cf2e0ca251e0ef88673b89120"
integrity sha512-zhlrhA9eiuEzja4wxVvotgXHtqd3qsYbXkQ3rsBfOgbFA9BVeErpDE/yEwtlIviRGEqpuFj/oU5owD6ByaNX+w==
dependencies:
recyclerlistview "4.2.3"
tslib "2.8.1"

"@sinclair/typebox@^0.27.8":
Expand Down Expand Up @@ -6577,7 +6576,7 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"

lodash.debounce@4.0.8, lodash.debounce@^4.0.8:
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==
Expand Down Expand Up @@ -7568,7 +7567,7 @@ prompts@^2.0.1, prompts@^2.2.1, prompts@^2.3.2:
kleur "^3.0.3"
sisteransi "^1.0.5"

prop-types@15.8.1, prop-types@^15.8.1:
prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
Expand Down Expand Up @@ -7850,15 +7849,6 @@ react@19.0.0:
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd"
integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==

recyclerlistview@4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/recyclerlistview/-/recyclerlistview-4.2.3.tgz#14032e7ad2f24396e24d5b3060c6ba76b567f000"
integrity sha512-STR/wj/FyT8EMsBzzhZ1l2goYirMkIgfV3gYEPxI3Kf3lOnu6f7Dryhyw7/IkQrgX5xtTcDrZMqytvteH9rL3g==
dependencies:
lodash.debounce "4.0.8"
prop-types "15.8.1"
ts-object-utils "0.0.5"

redent@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f"
Expand Down Expand Up @@ -8804,11 +8794,6 @@ ts-interface-checker@^0.1.9:
resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==

ts-object-utils@0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/ts-object-utils/-/ts-object-utils-0.0.5.tgz#95361cdecd7e52167cfc5e634c76345e90a26077"
integrity sha512-iV0GvHqOmilbIKJsfyfJY9/dNHCs969z3so90dQWsO1eMMozvTpnB1MEaUbb3FYtZTGjv5sIy/xmslEz0Rg2TA==

tsconfig-paths@^3.15.0:
version "3.15.0"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4"
Expand Down