Skip to content

Commit

Permalink
fix: remove refresh button for online
Browse files Browse the repository at this point in the history
  • Loading branch information
hopetambala committed Apr 23, 2021
1 parent 455ba4c commit c83b6df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/ResidentIdSearchbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const ResidentIdSearchbar = ({ surveyee, setSurveyee, surveyingOrganization }) =
);

const onChangeSearch = (input) => {
setLoading(true);
clearTimeout(searchTimeout);

setQuery(input);
Expand Down Expand Up @@ -133,7 +134,9 @@ const ResidentIdSearchbar = ({ surveyee, setSurveyee, surveyingOrganization }) =
onChangeText={onChangeSearch}
value={query}
/>
<Button onPress={fetchData}>{I18n.t('global.refresh')}</Button>
{!online &&
<Button onPress={() => fetchData(false, '')}>{I18n.t('global.refresh')}</Button>
}
{loading
&& <Spinner color="blue" />}

Expand Down

0 comments on commit c83b6df

Please sign in to comment.