-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds grouped view to circulars archive index
- Loading branch information
Showing
22 changed files
with
358 additions
and
72 deletions.
There are no files selected for viewing
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
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
53 changes: 53 additions & 0 deletions
53
app/routes/circulars._archive._index/SynonymGroupIndex.tsx
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,53 @@ | ||
/*! | ||
* Copyright © 2023 United States Government as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All Rights Reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Link } from '@remix-run/react' | ||
|
||
import type { SynonymGroupWithMembers } from '../synonyms/synonyms.lib' | ||
|
||
export default function ({ | ||
allItems, | ||
totalItems, | ||
searchString, | ||
query, | ||
}: { | ||
allItems: SynonymGroupWithMembers[] | ||
totalItems: number | ||
searchString: string | ||
query?: string | ||
}) { | ||
return ( | ||
<> | ||
{query && ( | ||
<h3> | ||
{totalItems} result{totalItems != 1 && 's'} found. | ||
</h3> | ||
)} | ||
|
||
{allItems.map(({ group, members }) => ( | ||
<div key={group.synonymId}> | ||
<details> | ||
<summary> | ||
<Link to={`/group/${group.synonymId}${searchString}`}> | ||
{group.eventIds.join(', ')} | ||
</Link> | ||
</summary> | ||
<ul> | ||
{members.map(({ circularId, subject }) => { | ||
return ( | ||
<li key={circularId}> | ||
<Link to={`/circular/${circularId}`}>{subject}</Link> | ||
</li> | ||
) | ||
})} | ||
</ul> | ||
</details> | ||
</div> | ||
))} | ||
</> | ||
) | ||
} |
Oops, something went wrong.