Skip to content
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

Sorting sources and registers in alphabetical order #92

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions next-app/src/app/datasources/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ export default function DataPage(): ReactElement {
return (
selectedFilters.dataTypes.length === 0 ||
selectedFilters.dataTypes.some((filter) =>
dataSource.data.some((tag) => tag.toLowerCase() === filter.toLowerCase())
dataSource.data.some(
(tag) => tag.toLowerCase() === filter.toLowerCase()
)
)
);
}
Expand Down Expand Up @@ -197,7 +199,8 @@ export default function DataPage(): ReactElement {
<div className="space-y-8">
{/* Disclaimer */}
<div className="w-full max-w-lg bg-muted border border-neutral rounded-lg p-4 text-sm text-muted-foreground text-left mx-auto">
To access data, researchers may need to obtain ethical approval, submit data requests and set up data management agreements.
To access data, researchers may need to obtain ethical approval,
submit data requests and set up data management agreements.
</div>
{/* Search */}
<div className="space-y-4">
Expand Down Expand Up @@ -286,6 +289,7 @@ export default function DataPage(): ReactElement {
.filter((data) => applyDataTypeFilter(data))
.filter((data) => applyDiseaseTypeFilter(data))
.filter((data) => applySearchBar(data))
.sort((a, b) => a.name.localeCompare(b.name))
.map((item, index) => (
<Card key={index}>
<CardHeader className="bg-muted">
Expand Down
6 changes: 4 additions & 2 deletions next-app/src/app/registries/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ export default function RegistryPage() {
<div className="space-y-8">
{/* Disclaimer */}
<div className="w-full max-w-lg bg-muted border border-neutral rounded-lg p-4 text-sm text-muted-foreground text-left mx-auto">
To access data, researchers may need to obtain ethical approval, submit data requests and set up data management agreements.
</div>
To access data, researchers may need to obtain ethical approval,
submit data requests and set up data management agreements.
</div>
{/* Search */}
<div className="space-y-4">
<label
Expand Down Expand Up @@ -287,6 +288,7 @@ export default function RegistryPage() {
.filter((registry) => applyRegistryCentreFilter(registry))
.filter((registry) => applyRegistryCategoryFilter(registry))
.filter((registry) => applySearchBar(registry))
.sort((a, b) => a.name.localeCompare(b.name))
.map((item, index) => (
<Card key={index}>
<CardHeader className="bg-muted">
Expand Down
Loading