Merge pull request #831 from ONLYOFFICE/bugfix/fixed-logo-click
Bugfix/fixed logo click
This commit is contained in:
commit
39a4103646
@ -92,7 +92,7 @@ export default inject(({ filesStore, selectedFolderStore }) => {
|
||||
const { navigationPath, parentId } = selectedFolderStore;
|
||||
|
||||
let isRootRoom, isRoom, id;
|
||||
if (navigationPath.length) {
|
||||
if (navigationPath && navigationPath.length) {
|
||||
isRootRoom = navigationPath.at(-1).isRootRoom;
|
||||
isRoom = navigationPath.at(-1).isRoom;
|
||||
id = navigationPath.at(-1).id;
|
||||
|
@ -165,6 +165,8 @@ const StyledArticleHeader = styled.div`
|
||||
StyledArticleHeader.defaultProps = { theme: Base };
|
||||
|
||||
const StyledHeading = styled.div`
|
||||
height: 24px;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
@ -191,6 +193,7 @@ const StyledHeading = styled.div`
|
||||
`;
|
||||
|
||||
const StyledIconBox = styled.div`
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
|
@ -3,15 +3,13 @@ import PropTypes from "prop-types";
|
||||
import { useHistory, useLocation } from "react-router";
|
||||
import Loaders from "@docspace/common/components/Loaders";
|
||||
import { isTablet as isTabletUtils } from "@docspace/components/utils/device";
|
||||
import Link from "@docspace/components/link";
|
||||
import { isTablet, isMobileOnly } from "react-device-detect";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { ReactSVG } from "react-svg";
|
||||
import styled, { css } from "styled-components";
|
||||
import {
|
||||
StyledArticleHeader,
|
||||
StyledHeading,
|
||||
StyledIconBox,
|
||||
StyledMenuIcon,
|
||||
} from "../styled-article";
|
||||
|
||||
const ArticleHeader = ({
|
||||
@ -62,10 +60,9 @@ const ArticleHeader = ({
|
||||
<Loaders.ArticleHeader height="24px" width="211px" />
|
||||
) : (
|
||||
<StyledHeading showText={showText} size="large">
|
||||
<img
|
||||
src="/static/images/logo.docspace.react.svg"
|
||||
onClick={onLogoClick}
|
||||
/>
|
||||
<Link href={showText ? "/" : null} onClick={onLogoClick}>
|
||||
<img src="/static/images/logo.docspace.react.svg" />
|
||||
</Link>
|
||||
</StyledHeading>
|
||||
)}
|
||||
</StyledArticleHeader>
|
||||
|
Loading…
Reference in New Issue
Block a user