Skip to content

Commit

Permalink
[#48] fix: enable search by date and text
Browse files Browse the repository at this point in the history
  • Loading branch information
hee-suh committed May 22, 2022
1 parent 2b10d1e commit 6259c0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react-native/screens/SearchScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function SearchScreen({ navigation }: Navigation) {
setDatePickerVisibility(false);
};

const handleConfirm = (date: Date) => () => {
const handleConfirm = (date: Date) => {
console.log("A date has been picked: ", date);
const splitedDate = date.toISOString().split("T")[0];
setSearchDate(splitedDate);
Expand All @@ -101,7 +101,7 @@ export default function SearchScreen({ navigation }: Navigation) {
hideDatePicker();
};

const searchFilter = (text: string | void) => () => {
const searchFilter = (text: string | void) => {
if (text) {
const newData = notices?.filter((notice) => {
const noticeData = notice.saved_titles?.join().toUpperCase();
Expand Down

0 comments on commit 6259c0c

Please sign in to comment.