Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM node:20.3.1 as builder

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

ARG vite_show_dashboard_sidebar=true
ENV VITE_SHOW_DASHBOARD_SIDEBAR=${vite_show_dashboard_sidebar}

WORKDIR /app
ADD . .
RUN apt-get -qq update
Expand Down
6 changes: 4 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
This file is part of Astarte.

Copyright 2020-2021 Ispirata Srl
Copyright 2020-2026 SECO Mind Srl

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -109,7 +109,9 @@
<ReduxProvider store={reduxStore}>
<Container fluid className="px-0">
<Row className="g-0">
<DashboardSidebar />
{(import.meta.env.VITE_SHOW_DASHBOARD_SIDEBAR?.toLowerCase() || 'true') === 'true' && (
<DashboardSidebar />
)}
<Col className="main-content bg-light vh-100 overflow-auto d-flex flex-column">
<PageRouter />
</Col>
Expand Down Expand Up @@ -140,7 +142,7 @@
}

export default ({ config }: Props): React.ReactElement => (
<AlertsProvider>

Check warning on line 145 in src/App.tsx

View workflow job for this annotation

GitHub Actions / Run code quality and funcionality tests

Assign arrow function to a variable before exporting as module default

Check warning on line 145 in src/App.tsx

View workflow job for this annotation

GitHub Actions / Run code quality and funcionality tests

Assign arrow function to a variable before exporting as module default

Check warning on line 145 in src/App.tsx

View workflow job for this annotation

GitHub Actions / Node 22 on ubuntu-latest

Assign arrow function to a variable before exporting as module default
<RouterProvider>
{config ? (
<ConfigProvider config={config}>
Expand Down
8 changes: 8 additions & 0 deletions src/vite.env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_SHOW_DASHBOARD_SIDEBAR: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
Loading