fixed exception warning
This commit is contained in:
parent
61aac91d07
commit
f659632108
@ -6,30 +6,31 @@ import PropTypes from "prop-types";
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledInfoPanelHeader = styled.div`
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #eceef1;
|
||||
|
||||
.header-text {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
margin-right: 16px;
|
||||
@media ${tablet} {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const SubInfoPanelHeader = ({ children, toggleIsVisible }) => {
|
||||
const content = children?.props?.children;
|
||||
|
||||
const StyledInfoPanelHeader = styled.div`
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #eceef1;
|
||||
|
||||
.header-text {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
margin-right: 16px;
|
||||
@media ${tablet} {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`;
|
||||
return (
|
||||
<StyledInfoPanelHeader>
|
||||
<Text className="header-text" fontSize="21px" fontWeight="700">
|
||||
|
@ -129,8 +129,8 @@ const SingleItem = (props) => {
|
||||
id: "Owner",
|
||||
title: t("Common:Owner"),
|
||||
content: styledLink(
|
||||
item.createdBy.displayName,
|
||||
item.createdBy.profileUrl
|
||||
item.createdBy?.displayName,
|
||||
item.createdBy?.profileUrl
|
||||
),
|
||||
},
|
||||
{
|
||||
@ -157,8 +157,8 @@ const SingleItem = (props) => {
|
||||
id: "LastModifiedBy",
|
||||
title: t("LastModifiedBy"),
|
||||
content: styledLink(
|
||||
item.updatedBy.displayName,
|
||||
item.updatedBy.profileUrl
|
||||
item.updatedBy?.displayName,
|
||||
item.updatedBy?.profileUrl
|
||||
),
|
||||
},
|
||||
{
|
||||
@ -173,7 +173,7 @@ const SingleItem = (props) => {
|
||||
result.splice(3, 0, {
|
||||
id: "FileExtension",
|
||||
title: t("FileExtension"),
|
||||
content: styledText(item.fileExst.split(".")[1].toUpperCase()),
|
||||
content: styledText(item.fileExst?.split(".")[1].toUpperCase()),
|
||||
});
|
||||
|
||||
result.push(
|
||||
@ -201,8 +201,8 @@ const SingleItem = (props) => {
|
||||
properties: getSingleItemProperties(selectedItem),
|
||||
access: {
|
||||
owner: {
|
||||
img: selectedItem.createdBy.avatarSmall,
|
||||
link: selectedItem.createdBy.profileUrl,
|
||||
img: selectedItem.createdBy?.avatarSmall,
|
||||
link: selectedItem.createdBy?.profileUrl,
|
||||
},
|
||||
others: [],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user