properly load sessionstorage
This commit is contained in:
parent
9f17e89b5b
commit
930a440b02
|
@ -30,7 +30,7 @@ class IAPIObject {
|
|||
_checkStorageSupport();
|
||||
if (!window.sessionStorage.getItem(this.storage_key))
|
||||
return false;
|
||||
return new APIToken(window.sessionStorage.getItem(this.storage_key));
|
||||
return new APIToken(JSON.parse(window.sessionStorage.getItem(this.storage_key)));
|
||||
}
|
||||
|
||||
/** @returns {boolean} */
|
||||
|
|
|
@ -159,8 +159,7 @@ const CardApartament = function (props) {
|
|||
}
|
||||
|
||||
</h3>
|
||||
<Address>{props.results.address}, {props.results.floor} этаж из {props.results.floorHouse}</Address>
|
||||
|
||||
<Address>{props.results.address}, {props.results.floor} этаж из {props.results.floorHouse}</Address>
|
||||
</a>
|
||||
<TransportSection>
|
||||
<TransportIcon>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
|
|||
import styled from 'styled-components';
|
||||
import SVGIcon from '../UI/Icon/SVGIcon';
|
||||
|
||||
// import './styles/Header.css';
|
||||
import { User } from '../../API/User';
|
||||
|
||||
const HeaderElement = styled.header`
|
||||
min-width: 950px;
|
||||
|
@ -56,6 +56,9 @@ const Navbar = styled.nav`
|
|||
`;
|
||||
|
||||
const Header = function () {
|
||||
|
||||
const user = User.restoreFromLocalStorage();
|
||||
|
||||
return (
|
||||
<HeaderElement>
|
||||
<LogoSection>
|
||||
|
|
Loading…
Reference in New Issue