From 1fb4fc89f204e02c487812be2f2c027aa4d8e676 Mon Sep 17 00:00:00 2001 From: adro Date: Tue, 7 Nov 2023 14:21:01 +0100 Subject: [PATCH] Minor Type error fix - Added additional readme information --- client/README.md | 8 ++++++++ client/src/definitions.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/README.md b/client/README.md index e701022..b38290f 100644 --- a/client/README.md +++ b/client/README.md @@ -23,3 +23,11 @@ These libraries aren't mandatory to be able to work on the nfSense web client, t - ESLint: The standard JS linter, which we also use to enforce some code style choices. - Iconify: Icons (Could be replaced with custom ones) - Markdown-It: We prefer markdown for informational texts, and use this to render it on the frontend. + +### High-Level choices +We are currently not using a component library to maintain full control over our styling and keep the bundle small and dependencies few. + +We do not use JavaScript-Based layouting and animations. Components simply render out DOM nodes that are styled and animated with CSS alone. + +## Building +We use pnpm as our package manager please follow their documentation to set up a working development environment on the latest stable release of Node. Run `pnpm run dev` to start a development server, or `pnpm run build` to generate distribution files. We're working on including launch tasks to allow seamless debugging within VSCodium. diff --git a/client/src/definitions.ts b/client/src/definitions.ts index 7e41fa0..e9b9b0b 100644 --- a/client/src/definitions.ts +++ b/client/src/definitions.ts @@ -5,7 +5,7 @@ const GetHardwareInterfaces: SearchProvider = async (o) => { let res = await apiCall('network.links.list', {}); if (res.Error === null) { console.debug('links', res.Data); - return Object.fromEntries(res.Data.map(r => [r.name, { display: r.name }])); + return Object.fromEntries(res.Data.map((r: any) => [r.name, { display: r.name }])); } else { console.debug('error', res); return {} as Options;