-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature advanced search #2067
base: master
Are you sure you want to change the base?
Feature advanced search #2067
Conversation
f5508c1
to
7069673
Compare
back: { | ||
title: `Go back to ${type}`, | ||
title: `Go back to test`, | ||
action: () => window.history.back() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This button should be removed.
"eslint-plugin-header": "^3.1.1" | ||
"eslint-plugin-header": "^3.1.1", | ||
"liqe": "^3.6.0", | ||
"react-datepicker": "^4.10.0", | ||
"react-fast-compare": "^3.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these libraries doing here? This is the global package.json
.
ml={1} | ||
sx={{ textOverflow: "ellipsis" }} | ||
> | ||
{props.item.main2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's main2
?
ml={1} | ||
sx={{ textOverflow: "ellipsis" }} | ||
> | ||
{props.item.main1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's main1
?
setResults(results); | ||
})(); | ||
}, [nonce, type, context]); | ||
useEffect(() => {}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for?
|
||
if (!title) return hardNavigate("/"); | ||
const type = "notes"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why fix it to notes
?
|
||
return ( | ||
<> | ||
<Text variant="subtitle" mx={2}> | ||
Searching {title} | ||
Searching {type} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just say Searching...
<Flex mx={2}> | ||
{results.map((result, index) => | ||
result.length > 0 ? ( | ||
<Button | ||
variant="tertiary" | ||
sx={{ | ||
borderColor: | ||
index === selectedResult ? "primary" : undefined | ||
}} | ||
mr={1} | ||
onClick={() => { | ||
setSearchItem(result); | ||
setSelectedResult(index); | ||
}} | ||
> | ||
{`${result[0].type}s`} | ||
</Button> | ||
) : ( | ||
[] | ||
) | ||
)} | ||
</Flex> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for?
{searchItem.length > 0 ? ( | ||
<SearchResults | ||
title={capitalizeFirstLetter(`${searchItem[0].type}s`)} | ||
context={context} | ||
type={`${searchItem[0].type}s`} | ||
results={searchItem} | ||
></SearchResults> | ||
) : ( | ||
<Text variant="subtitle" mx={2}> | ||
{"No items to show"} | ||
</Text> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can already be done via ListContainer. No need to reinvent the wheel.
No description provided.