Merge pull request #831 from ONLYOFFICE/bugfix/fixed-logo-click

Bugfix/fixed logo click
This commit is contained in:
Alexey Safronov 2022-09-16 16:04:43 +03:00 committed by GitHub
commit 39a4103646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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>