Skip to content

Commit 4a90a2e

Browse files
committed
show both versions in nav bar
1 parent 62ff7e3 commit 4a90a2e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
VITE_APP_API_URL=http://localhost:2021
2+
VITE_BACKEND_VERSION=0.0.0 # To be set during packaging step

.env.prod

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
VITE_APP_API_URL=
2+
VITE_BACKEND_VERSION=0.0.0 # To be set during packaging step

src/views/Navigation/NavBar.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export class NavBar extends React.Component<NavBarProps, NavBarState> {
3636
}
3737
}
3838

39-
private version = import.meta.env.PACKAGE_VERSION
39+
private frontend_version = import.meta.env.PACKAGE_VERSION
40+
private backend_version = import.meta.env.VITE_BACKEND_VERSION
4041

4142
private openDrawer = () => {
4243
this.setState({ drawerOpen: true })
@@ -161,7 +162,8 @@ export class NavBar extends React.Component<NavBarProps, NavBarState> {
161162
bottom: 0,
162163
}}
163164
>
164-
v{this.version}
165+
Frontend: v{this.frontend_version}<br />
166+
Backend: v{this.backend_version}
165167
</Typography>
166168
</List>
167169
</div>

0 commit comments

Comments
 (0)