File tree Expand file tree Collapse file tree 4 files changed +56
-19
lines changed
src/components/explore-section/Circuit Expand file tree Collapse file tree 4 files changed +56
-19
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
import { CircuitSchemaProps } from '../type' ;
2
2
import HeaderDetailView from './HeaderDetailView' ;
3
+ import Visualiser from './visualisation/Visualiser' ;
3
4
4
5
export default function MainDetailViewCore ( { content } : { content : CircuitSchemaProps } ) {
5
6
return (
6
7
< div className = "relative flex w-full flex-col text-primary-9" >
7
8
< HeaderDetailView content = { content } />
9
+ < Visualiser content = { content } />
8
10
</ div >
9
11
) ;
10
12
}
Original file line number Diff line number Diff line change
1
+ 'use client' ;
2
+
3
+ import Image from 'next/image' ;
4
+ import { CircuitSchemaProps } from '../../type' ;
5
+ import placeholderImage from './circuit-preview-image_01.jpg' ;
6
+
7
+ export default function Visualiser ( { content } : { content : CircuitSchemaProps } ) {
8
+ const imageUrl = content . overview . mainDisplay [ 0 ] . url ;
9
+
10
+ return (
11
+ < div
12
+ id = "visualiser"
13
+ className = "relative my-24 flex w-full items-center justify-center overflow-hidden bg-white"
14
+ >
15
+ < Image
16
+ src = { imageUrl || placeholderImage }
17
+ width = { 1920 }
18
+ height = { 1080 }
19
+ alt = { `Image of the circuit ${ content . name } ` }
20
+ className = "relative z-10 select-none transition-all duration-300 ease-out"
21
+ priority
22
+ />
23
+ </ div >
24
+ ) ;
25
+ }
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ export type CircuitSchemaProps = {
29
29
key : string ;
30
30
name : string ;
31
31
description : string ;
32
- parent ?: string ;
32
+ parent ?: string | null ;
33
+ derivedFrom : string [ ] ;
33
34
hasSubcircuits : boolean ;
34
35
brainRegion : string ;
35
36
species : string ;
@@ -38,11 +39,11 @@ export type CircuitSchemaProps = {
38
39
numberOfSynapses : number ;
39
40
metadata : {
40
41
contributorSimple ?: string ;
41
- contributor ?: string ;
42
+ contributor ?: string | null ;
42
43
contributingInstitution ?: string ;
43
44
registrationDate ?: string ;
44
45
revision : number | null ;
45
- createdBy : string ;
46
+ createdBy : string | null ;
46
47
creationDate : string ;
47
48
license : {
48
49
name : string ;
@@ -55,24 +56,33 @@ export type CircuitSchemaProps = {
55
56
key : string ;
56
57
isAvailable : boolean ;
57
58
} [ ] ;
58
- subcircuits : CircuitSchemaProps [ ] | null ;
59
+ subcircuits : CircuitSchemaProps [ ] ;
59
60
60
- // TO BE REVISED
61
- provenance : {
62
- isASubcircuit : boolean ;
63
- subcircuitOf : string | null ;
64
- literature : PaperLitteratureProps [ ] ;
65
- } ;
66
- relatedPublications : PaperLitteratureProps [ ] ;
67
- images : {
68
- low ?: string | null ;
69
- normal ?: string | null ;
70
- high : string | null ;
71
- } ;
72
61
overview : {
73
- cellStatistics : GraphDataImageProps [ ] ;
74
- networkStatistics : GraphDataImageProps [ ] ;
62
+ mainDisplay : {
63
+ name : string ;
64
+ url : string ;
65
+ } [ ] ;
66
+ cellStatistics : {
67
+ name : string ;
68
+ url : string ;
69
+ } [ ] ;
70
+ networkStatistics : {
71
+ name : string ;
72
+ url : string ;
73
+ } [ ] ;
75
74
} ;
75
+
76
+ literature : {
77
+ category : string ;
78
+ title : string ;
79
+ authors : string ;
80
+ doi : string ;
81
+ url : string ;
82
+ journal : string ;
83
+ publicationDate : string ;
84
+ abstract : string ;
85
+ } [ ] ;
76
86
} ;
77
87
78
88
export type CircuitCellValue = {
You can’t perform that action at this time.
0 commit comments