Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Upgrade deps and make SERVER_PORT configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Dec 8, 2023
1 parent 758b9c4 commit 2d1b7ef
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 16,287 deletions.
6 changes: 6 additions & 0 deletions ui/ui-app/src/app/components/header/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Brand, Masthead, MastheadBrand, MastheadContent, MastheadMain } from "@
import { Link } from "react-router-dom";
import { NavigationService, useNavigation } from "@services/NavigationService.ts";
import { AppHeaderToolbar } from "@app/components";
import { ApiDesignerConfigType, useApiDesignerConfig } from "@app/contexts/config.ts";


export type AppHeaderProps = {
Expand All @@ -12,6 +13,11 @@ export type AppHeaderProps = {

export const AppHeader: FunctionComponent<AppHeaderProps> = () => {
const appNav: NavigationService = useNavigation();
const config: ApiDesignerConfigType | undefined = useApiDesignerConfig();

if (config?.components.masthead.show === false) {
return (<></>);
}

return (
<Masthead id="icon-router-link">
Expand Down
4 changes: 3 additions & 1 deletion ui/ui-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import react from "@vitejs/plugin-react-swc";

const PORT: number = parseInt(process.env.SERVER_PORT || "8888");

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tsconfigPaths()],
server: {
port: 8888
port: PORT
}
});
Loading

0 comments on commit 2d1b7ef

Please sign in to comment.