Skip to content

Commit

Permalink
fix(courses): search bar visible only on root-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioCostaMedich committed Oct 29, 2024
1 parent 27cbe5a commit b0c5822
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@
"subtitle_plural": "{{count}} files"
},
"courseDirectoryScreen": {
"clearSearch": "Clear search",
"noResult": "No results found",
"navigateRecentFiles": "View recent",
"search": "Search",
"clearSearch": "Clear search"
"search": "Search"
},
"courseFileListItem": {
"openFileError": "Cannot open the file.",
Expand Down
4 changes: 2 additions & 2 deletions assets/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@
"subtitle_plural": "{{count}} file"
},
"courseDirectoryScreen": {
"clearSearch": "Cancella ricerca",
"noResult": "Nessun risultato trovato",
"navigateRecentFiles": "Sfoglia file recenti",
"search": "Cerca",
"clearSearch": "Cancella ricerca"
"search": "Cerca"
},
"courseFileListItem": {
"openFileError": "Impossibile aprire il file.",
Expand Down
10 changes: 6 additions & 4 deletions src/features/courses/screens/CourseDirectoryScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ export const CourseDirectoryScreen = ({ route, navigation }: Props) => {
<CourseFilesCacheProvider>
<FileCacheChecker />

<CourseSearchBar
searchFilter={searchFilter}
setSearchFilter={setSearchFilter}
/>
{navigation.getId() === 'FileTabNavigator' && (
<CourseSearchBar
searchFilter={searchFilter}
setSearchFilter={setSearchFilter}
/>
)}

{searchFilter ? (
<CourseFileSearchFlatList
Expand Down

0 comments on commit b0c5822

Please sign in to comment.