Skip to content
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
6 changes: 3 additions & 3 deletions src/components/home/home_samples.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { RocQueryResult } from '../../hooks/use_roc_query.js';
import { useRocQuery } from '../../hooks/use_roc_query.js';
import type { TocEntry } from '../../types/db.js';
import type { SampleTocEntry } from '../../types/db.js';
import Spinner from '../spinner.js';

import { useHomeContext, useHomeDispatchContext } from './home_context.js';
import HomeSelector from './home_selector.js';

export default function HomeSamples() {
const { loading, error, result } = useRocQuery<TocEntry>('sample_toc');
const { loading, error, result } = useRocQuery<SampleTocEntry>('sample_toc');
if (error) {
return <div>Failed to load sample ToC: {error?.message}</div>;
}
Expand All @@ -30,7 +30,7 @@ export default function HomeSamples() {
);
}

function SampleToc(props: { samples: Array<RocQueryResult<TocEntry>> }) {
function SampleToc(props: { samples: Array<RocQueryResult<SampleTocEntry>> }) {
const { selectedSample } = useHomeContext();
const dispatch = useHomeDispatchContext();
function selectSample(id: string) {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export {
useIframeBridgeContext,
useIframeBridgeSample,
} from './contexts/iframe_bridge.js';
export * from './types/db.js';
3 changes: 2 additions & 1 deletion src/types/db.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface TocEntry {
export interface SampleTocEntry {
mf: string;
mw: number;
keyword: string[];
Expand Down Expand Up @@ -78,4 +78,5 @@
jcamp: {
filename: string;
};
nmrium: any;

Check warning on line 81 in src/types/db.ts

View workflow job for this annotation

GitHub Actions / nodejs / lint-eslint

Unexpected any. Specify a different type
}
Loading