mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
Refactor search logic
- type events that are handed between components
- simplify the `resolve` function interface
- before we had return values and exceptions, now just a single union
type as return value
- move navigation to the Search component to reduce its
responsibilities
- flatten and simplify multi-level branching
- shuffle around code
- move the `resolve` function to the `Search` component module,
because it's only used there
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -19,7 +19,12 @@
|
||||
|
||||
const getProjects =
|
||||
config.projects.pinned.length > 0
|
||||
? Project.getMulti(config.projects.pinned)
|
||||
? Project.getMulti(
|
||||
config.projects.pinned.map(project => ({
|
||||
nameOrUrn: project.urn,
|
||||
seed: project.seed,
|
||||
})),
|
||||
)
|
||||
: Promise.resolve([]);
|
||||
|
||||
const onClick = (project: ProjectInfo, seed: Host) => {
|
||||
|
||||
Reference in New Issue
Block a user