Use .env file
This commit is contained in:
parent
ce843a52db
commit
20300f4669
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Set user specific variables
|
||||||
|
REACT_APP_TITLE=Simple Picture Gallery
|
||||||
|
REACT_APP_APPBAR_COLOR=#1976D2
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue