New Changes in login and title menu.
needed fix the reactive actions in user profilepull/14/head^2
parent
a6d380862f
commit
87e0d61281
|
@ -1,4 +1,5 @@
|
|||
import styled from "styled-components";
|
||||
import { color } from "../../../style/varibles";
|
||||
|
||||
const MainContainerStyled = styled.main`
|
||||
padding-left: 97px;
|
||||
|
@ -21,6 +22,9 @@ const ContentContainerStyled = styled.div`
|
|||
height: 100vh;
|
||||
overflow: hidden;
|
||||
margin-top: 16px;
|
||||
border-radius: 5px;
|
||||
background-color: ${color.complement.azulOscuro};
|
||||
padding: 6px;
|
||||
`;
|
||||
|
||||
export default MainContainerStyled;
|
||||
|
|
|
@ -9,14 +9,11 @@ import logo from "../../assets/images/Logo.png";
|
|||
|
||||
const PageTitle = () => {
|
||||
const path = useLocation();
|
||||
const [title,setTitle] = React.useState()
|
||||
const [title, setTitle] = React.useState();
|
||||
const [modal, setModal] = React.useState(false);
|
||||
const { user } = React.useContext(AuthContext);
|
||||
|
||||
|
||||
console.log(path.pathname);
|
||||
|
||||
React.useEffect(()=>{
|
||||
React.useEffect(() => {
|
||||
switch (path.pathname) {
|
||||
case "/tickets":
|
||||
setTitle("Tickets");
|
||||
|
@ -51,7 +48,7 @@ const PageTitle = () => {
|
|||
default:
|
||||
setTitle("Dashboard");
|
||||
}
|
||||
},[path])
|
||||
}, [path]);
|
||||
|
||||
const handleModal = () => {
|
||||
setModal(!modal);
|
||||
|
|
|
@ -34,7 +34,7 @@ const UserBtn = ({ user, img, modal, modalSet }) => {
|
|||
<UserItem title="Sair" icon={<Signoff />} onClick={handleModal} />
|
||||
</UserModalListStyled>
|
||||
</UserModalStyled>
|
||||
<UserModal modal={modalUser} click={handleModalUser}/>
|
||||
<UserModal modal={modalUser} click={handleModalUser} userId={user.id}/>
|
||||
<ConfirmationModal title="Sair?" modal={modalConfirm} click={{ handleModal, handleLogout }}>
|
||||
Deseja Sair do sistema?
|
||||
</ConfirmationModal>
|
||||
|
|
|
@ -7,8 +7,7 @@ import { i18n } from "../translate/i18n";
|
|||
import MenuComponent from "../components/Menu/MenuComponent";
|
||||
|
||||
const LoggedInLayout = ({ children }) => {
|
||||
const { handleLogout, loading, isAuth } = React.useContext(AuthContext);
|
||||
|
||||
const { loading, user } = React.useContext(AuthContext);
|
||||
|
||||
if (loading) {
|
||||
return <Loading />;
|
||||
|
|
Loading…
Reference in New Issue