Skip to content

Commit 9734cde

Browse files
committed
Added NODE_ENV for building
1 parent 0a4de46 commit 9734cde

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151

5252
- name: Build React
5353
run: npm run build
54+
env:
55+
NODE_ENV: production
5456

5557
- name: Upload artifact
5658
uses: actions/upload-pages-artifact@v1

src/Visualizer/components/DatabaseMenuPopup.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import databases from "../../config/databases";
55

66
export function DatabaseMenuPopup(props: DatabaseMenuPopupProps) {
77
const databaseHref = ((databaseName: string) => {
8-
return `/databases/${databaseName}`;
8+
if(process.env.NODE_ENV === "production") {
9+
return `/sql_schema_visualizer/databases/${databaseName}`
10+
} else {
11+
return `/databases/${databaseName}`;
12+
}
913
});
1014

1115
return (

0 commit comments

Comments
 (0)