botPosition
parent
49db1e4f08
commit
91f0fb0651
|
@ -42,3 +42,6 @@ docker run --restart=always -p 5005:80 -d cloud.canister.io:5000/tstanciu/revers
|
||||||
Rename container
|
Rename container
|
||||||
docker rename <containet_id> reverse-proxy-frontend
|
docker rename <containet_id> reverse-proxy-frontend
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
|
|
||||||
|
import { makeStyles, useTheme } from "@material-ui/core/styles";
|
||||||
|
const theme = useTheme();
|
|
@ -3,17 +3,31 @@ import PropTypes from "prop-types";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { botType } from "../botType";
|
import { botType } from "../botType";
|
||||||
import Wizard from "./Wizard";
|
import Wizard from "./Wizard";
|
||||||
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
|
|
||||||
|
const useStyles = makeStyles(theme => ({
|
||||||
|
bot: {
|
||||||
|
position: "fixed",
|
||||||
|
bottom: theme.spacing(2),
|
||||||
|
right: theme.spacing(2),
|
||||||
|
zIndex: 1
|
||||||
|
},
|
||||||
|
botPosition: {
|
||||||
|
position: "absolute"
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
const BotsManager = ({ bot }) => {
|
const BotsManager = ({ bot }) => {
|
||||||
const [type, setType] = useState(bot.type);
|
const [type, setType] = useState(bot.type);
|
||||||
|
const classes = useStyles();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (bot.type) setType(bot.type);
|
if (bot.type) setType(bot.type);
|
||||||
}, [bot.type]);
|
}, [bot.type]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ position: "absolute" }}>
|
<div className={classes.botPosition}>
|
||||||
{type === botType.wizard && <Wizard />}
|
<div className={classes.bot}>{type === botType.wizard && <Wizard />}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue