Skip to content

Commit

Permalink
[#51] Add dev title for the development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan authored and blcham committed Nov 1, 2024
1 parent a63cfd4 commit f7e790b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
S_PIPES_APP_TITLE=SPipes Editor Dev
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
S_PIPES_APP_TITLE=SPipes Editor
3 changes: 2 additions & 1 deletion src/components/NavbarMenu.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from "react";
import { Nav, Navbar } from "react-bootstrap";
import { APP_TITLE } from "@config/env.js";

const NavbarMenu = () => {
return (
<Navbar bg="light" expand="lg" style={{ zIndex: 100 }}>
<Navbar.Brand href="/">S-Pipes UI</Navbar.Brand>
<Navbar.Brand href="/">{APP_TITLE}</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="mr-auto">
Expand Down
2 changes: 2 additions & 0 deletions src/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ export const getEnv = (name, defaultValue) => {

throw new Error(`Missing environment variable: ${name}`);
};

export const APP_TITLE = getEnv("APP_TITLE", "SPipes Editor");
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default defineConfig({
envPrefix: "S_PIPES_",
resolve: {
mainFields: [],
alias: {
"@config": "/src/config",
},
},
server: {
proxy: {
Expand Down

0 comments on commit f7e790b

Please sign in to comment.