diff --git a/cspell-dictionaries/project.txt b/cspell-dictionaries/project.txt index 9f1343d..720381b 100644 --- a/cspell-dictionaries/project.txt +++ b/cspell-dictionaries/project.txt @@ -1,3 +1,4 @@ +Descriptionless Pipeable +plex Stephane -Descriptionless diff --git a/src/components/footer/Footer.jsx b/src/components/footer/Footer.jsx index ce61522..62049b3 100644 --- a/src/components/footer/Footer.jsx +++ b/src/components/footer/Footer.jsx @@ -5,15 +5,17 @@ * LICENSE file in the root directory of this source tree. */ -import { AspectRatio, Column } from '@carbon/react'; +import { AspectRatio, Column, Grid } from '@carbon/react'; export const Footer = () => { return ( - - -

Footer

-

Copyright IBM 2025

-
-
+ + + +

Footer

+

Copyright IBM 2025

+
+
+
); }; diff --git a/src/pages/dashboard/Dashboard.jsx b/src/pages/dashboard/Dashboard.jsx index 2c00aba..6aa56ea 100644 --- a/src/pages/dashboard/Dashboard.jsx +++ b/src/pages/dashboard/Dashboard.jsx @@ -5,42 +5,17 @@ * LICENSE file in the root directory of this source tree. */ -import { Column, Grid, Link, Tile, Stack } from '@carbon/react'; -import { useState } from 'react'; -import { useParams, useSearchParams } from 'react-router'; - import { Footer } from '../../components/footer/Footer'; import { PageLayout } from '../../layouts/page-layout'; import { PageHeader } from '@carbon/ibm-products'; +import DashboardURLParameters from './DashboardURLParameters'; +import DashboardNumberTiles from './DashboardNumberTiles'; +import DashboardVisualizations from './DashboardVisualizations'; // The styles are imported into index.scss by default. // Do the same unless you have a good reason not to. -const NumberTile = () => { - const [activeUsers] = useState(() => Math.round(Math.random() * 1000)); - - return ( - - -
-
Active users
-
{activeUsers}
-
-
-
- ); -}; - const Dashboard = () => { - // Access path parameters (e.g., /dashboard/1234 -> id = "1234") - const params = useParams(); - const { id } = params; - - // Access query parameters (e.g., /dashboard/1234?q=xxx&name=John -> q = "xxx", name = "John") - const [searchParams] = useSearchParams(); - const queryParam = searchParams.get('q'); - const nameParam = searchParams.get('name'); - return ( { - - {/* Example: Display URL parameters when present */} - - - - URL parameters example - {nameParam && ( -

Hello {nameParam}! 👋

- )} -

- This demonstrates how to access both path parameters and query - parameters from the URL.
- Try accessing:{' '} - - /dashboard/1234?q=xyz&name=Anne - -

-
- {id && ( - <> -
Path parameter detected (id):
-
{id}
- - )} - {queryParam && ( - <> -
Query parameter detected (q):
-
{queryParam}
- - )} - {nameParam && ( - <> -
Query parameter detected (name):
-
{nameParam}
- - )} -
-
-
-
- - - - + + + + + - - - Visualization - - - - - Cool table - - -