Use .env file

This commit is contained in:
Stefan Forstenlechner 2022-04-09 21:10:50 +02:00
parent ce843a52db
commit 20300f4669
3 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,3 @@
# Set user specific variables
REACT_APP_TITLE=Simple Picture Gallery
REACT_APP_APPBAR_COLOR=#1976D2

View File

@ -27,7 +27,7 @@ function ImageGalleryAppBar({
<MenuIcon /> <MenuIcon />
</IconButton> </IconButton>
<Typography variant="h6" noWrap component="div"> <Typography variant="h6" noWrap component="div">
{process.env.TITLE ?? "Image Gallery"} {process.env.REACT_APP_TITLE ?? "Simple Picture Gallery"}
</Typography> </Typography>
</Toolbar> </Toolbar>
</AppBar> </AppBar>

View File

@ -7,6 +7,7 @@ const AppBar = styled(MuiAppBar, {
open?: boolean; open?: boolean;
drawerwidth: number; drawerwidth: number;
}>(({ theme, open, drawerwidth }) => ({ }>(({ theme, open, drawerwidth }) => ({
backgroundColor: process.env.REACT_APP_APPBAR_COLOR ?? "#1976D2",
transition: theme.transitions.create(["margin", "width"], { transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.sharp, easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen, duration: theme.transitions.duration.leavingScreen,