Skip to content

Commit 5909389

Browse files
Componisation of circuit table (#308)
* Added the component CircuitTable * Added columns and installed react-resizable * Added subcircuit, button and resizable columns * Added utils to filter * Added use-filtered-data * Added the filter for circuits * Style for the circuit table * Corrected the api path with circuits plural * Remove console log * Integrated the CircuitTable component in list view * Ran linter and prettier * Component for circuit page in both free and paid account + fixed some feedbacks from Pavlo --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com>
1 parent 5bebbe7 commit 5909389

File tree

24 files changed

+1287
-3233
lines changed

24 files changed

+1287
-3233
lines changed

package-lock.json

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"react-markdown": "^9.0.3",
104104
"react-pdf": "^7.7.0",
105105
"react-plotly.js": "^2.6.0",
106+
"react-resizable": "^3.0.5",
106107
"react-select": "^5.7.3",
107108
"react-syntax-highlighter": "^15.6.1",
108109
"sharp": "^0.33.5",
@@ -125,6 +126,7 @@
125126
"@types/react": "^18.2.5",
126127
"@types/react-dom": "^18.2.3",
127128
"@types/react-plotly.js": "^2.6.0",
129+
"@types/react-resizable": "^3.0.8",
128130
"@types/react-syntax-highlighter": "^15.5.13",
129131
"@types/three": "^0.152.1",
130132
"@typescript-eslint/eslint-plugin": "^7.7.0",

src/app/app/virtual-lab/(free)/explore/(interactive)/interactive/(data)/model/circuit/[key]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function CircuitDetailPage() {
1313
const [error, setError] = useState<string | null>(null);
1414

1515
const params = useParams();
16-
const circuitKey = params?.key as string | undefined;
16+
const circuitKey = params.key as string | undefined;
1717

1818
useEffect(() => {
1919
const fetchCircuit = async () => {
@@ -25,7 +25,7 @@ export default function CircuitDetailPage() {
2525

2626
try {
2727
setLoading(true);
28-
const response = await fetch('/api/circuit/data', {
28+
const response = await fetch('/api/circuits/data', {
2929
cache: 'no-store',
3030
});
3131

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
import ExploreCircuitTable from '@/components/explore-section/Circuit/ListView/ExploreCircuitTable';
2-
3-
export type ColumnType = {
4-
name: string;
5-
description: string;
6-
brainRegion: string;
7-
createdBy: string;
8-
creationDate: string;
9-
hasSubcircuits: boolean;
10-
};
1+
import CircuitsListingPageComponent from '@/components/explore-section/Circuit/global/CircuitsListingPageComponent';
112

123
export default function ExploreModelCircuitListingPage() {
13-
return <ExploreCircuitTable />;
4+
<CircuitsListingPageComponent />;
145
}
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
import ExploreCircuitTable from '@/components/explore-section/Circuit/ListView/ExploreCircuitTable';
2-
3-
export type ColumnType = {
4-
name: string;
5-
description: string;
6-
brainRegion: string;
7-
createdBy: string;
8-
creationDate: string;
9-
hasSubcircuits: boolean;
10-
};
1+
import CircuitsListingPageComponent from '@/components/explore-section/Circuit/global/CircuitsListingPageComponent';
112

123
export default function ExploreModelCircuitListingPage() {
13-
return <ExploreCircuitTable />;
4+
<CircuitsListingPageComponent />;
145
}

0 commit comments

Comments
 (0)