-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Damian Stasik <[email protected]>
- Loading branch information
1 parent
8b7d6bc
commit f7aa6fb
Showing
9 changed files
with
298 additions
and
244 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
75 changes: 0 additions & 75 deletions
75
frontend/src/components/Header/hooks/useGroupedResults.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { SearchResult } from "./types"; | ||
|
||
interface SearchModuleResultProps { | ||
result: SearchResult; | ||
} | ||
|
||
export function SearchModuleResult({ result }: SearchModuleResultProps) { | ||
return ( | ||
<> | ||
<div className="text-sm">{result.addr}</div> | ||
<div className="text-xs text-gray-500">{result.description}</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { SearchResult } from "./types"; | ||
|
||
interface SearchOtherResultProps { | ||
result: SearchResult; | ||
} | ||
|
||
export function SearchOtherResult({ result }: SearchOtherResultProps) { | ||
return ( | ||
<> | ||
<div className="text-sm">{result.addr}</div> | ||
<div className="text-xs text-gray-500">{result.description}</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { SearchResult, SearchResultType } from "./types"; | ||
|
||
interface SearchProviderResultProps { | ||
result: SearchResult; | ||
} | ||
|
||
export function SearchProviderResult({ result }: SearchProviderResultProps) { | ||
if (result.type === SearchResultType.ProviderResource) { | ||
return ( | ||
<> | ||
<div className="text-sm">Resource: {result.title}</div> | ||
<div className="text-sm">{result.addr}</div> | ||
<div className="text-xs text-gray-500">{result.description}</div> | ||
</> | ||
); | ||
} else if (result.type === SearchResultType.ProviderDatasource) { | ||
return ( | ||
<> | ||
<div className="text-sm">Data source: {result.title}</div> | ||
<div className="text-sm">{result.addr}</div> | ||
<div className="text-xs text-gray-500">{result.description}</div> | ||
</> | ||
); | ||
} else if (result.type === SearchResultType.ProviderFunction) { | ||
return ( | ||
<> | ||
<div className="text-sm">Function: {result.title}</div> | ||
<div className="text-sm">{result.addr}</div> | ||
<div className="text-xs text-gray-500">{result.description}</div> | ||
</> | ||
); | ||
} | ||
|
||
return ( | ||
<> | ||
<div className="text-sm">{result.addr}</div> | ||
<div className="text-xs text-gray-500">{result.description}</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.