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
1 change: 1 addition & 0 deletions src/components/Lottie/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function Lottie({source, webStyle, shouldLoadAfterInteractions, ...props}: Props
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
source={animationFile}
key={`${hasNavigatedAway}`}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we using a template string? Can we just pass the variable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@luacmartins hasNavigatedAway has type 'boolean' and it is not assignable to type 'Key | null | undefined'.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for clarifying. That looks a bit odd though, maybe we could have used a different key, but I won't block on that

ref={(ref) => {
if (typeof forwardedRef === 'function') {
forwardedRef(ref);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS
);
}

if (shouldShowEmptyState(isDataLoaded, data.length, searchResults.search.type) && isFocused) {
if (shouldShowEmptyState(isDataLoaded, data.length, searchResults.search.type)) {
return (
<View style={[shouldUseNarrowLayout ? styles.searchListContentContainerStyles : styles.mt3, styles.flex1]}>
<EmptySearchView
Expand Down