-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
1 deletion.
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
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
15 changes: 15 additions & 0 deletions
15
src/pages/common/DatasetWorkspace/plugins/snirf/SnirfView.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,15 @@ | ||
import { FunctionComponent } from "react"; | ||
import { DatasetPluginProps } from "../pluginInterface"; | ||
import Hdf5View from "../../../../NwbPage/Hdf5View"; | ||
|
||
const SnirfView: FunctionComponent<DatasetPluginProps> = ({ file, width }) => { | ||
// SNIRF files are HDF5 files, so we can use the Hdf5View component directly | ||
// file.urls[0] contains the URL to the SNIRF file | ||
return ( | ||
<div> | ||
<Hdf5View nwbUrl={file.urls[0]} width={width || 800} isExpanded={true} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SnirfView; |
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,11 @@ | ||
import { DatasetPlugin } from "../pluginInterface"; | ||
import SnirfView from "./SnirfView"; | ||
|
||
export const snirfPlugin: DatasetPlugin = { | ||
name: "snirf", | ||
type: ["*.snirf"], | ||
component: SnirfView, | ||
priority: 1, | ||
}; | ||
|
||
export default snirfPlugin; |