Skip to content

Commit

Permalink
feat: add search commands
Browse files Browse the repository at this point in the history
  • Loading branch information
halfmoon-mind committed Aug 24, 2023
1 parent 4e7912c commit a5db2c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ const Search = ({setlist, setStation, setId, setStoreName}) => {
if (search === 'exit') {
process.exit(0);
}
if (search === '') {
setlist(list => [...list, [[], search]]);
return;
}
if (search === 'clear') {
setlist([]);
setSearch('');
return;
}
setlist(list => [...list, [['command not found'], search]]);
setSearch('');
}
Expand Down

0 comments on commit a5db2c1

Please sign in to comment.