Skip to content

Commit

Permalink
GFF-238: update CrosswalkConfig (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigrbarnes authored Jan 24, 2025
1 parent f3461f3 commit 0b0d462
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/frontend/src/features/Crosswalk/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface CrosswalkName {
id: string;
label: string;
description?: string;
id: string; // id of corsswalk entry
label: string; // label for the table column
description?: string; // TODO: optional description that will show up as a tooltip
}

interface CrosswalkInfo extends CrosswalkName {
Expand Down
7 changes: 3 additions & 4 deletions packages/frontend/src/pages/Crosswalk/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import {
} from '../../features/Crosswalk';
import { type NavPageLayoutProps } from '../../features/Navigation';
import { GEN3_COMMONS_NAME } from '@gen3/core';
import { CrosswalkMapping } from '../../features/Crosswalk/types';

interface InitialCrosswalkInfo extends CrosswalkName {
dataPath: string;
}

export interface InitialCrosswalkConfig {
showSubmittedIdInTable?: boolean;
export interface InitialCrosswalkConfig
extends Omit<CrosswalkConfig, 'mapping'> {
mapping: {
source: CrosswalkName;
external: Array<InitialCrosswalkInfo>;
Expand All @@ -32,7 +31,7 @@ export const CrosswalkPageGetServerSideProps: GetServerSideProps<
const processedConfig = {
showSubmittedIdInTable: initialConfig.showSubmittedIdInTable,
idEntryPlaceholderText:
initialConfig?.showSubmittedIdInTable ||
initialConfig?.idEntryPlaceholderText ||
'Enter IDs, one per line.\nExample:\nD334343\nC343433',
mapping: {
source: initialConfig.mapping.source,
Expand Down

0 comments on commit 0b0d462

Please sign in to comment.