hotfixes for build status pre-release

This commit is contained in:
merelendor 2022-09-08 14:46:04 +03:00
parent 7831e0e62c
commit d1f31053ca
4 changed files with 16 additions and 9 deletions

View File

@ -94,7 +94,7 @@ class AnnouncementsList extends React.Component
<div className="feed">
<div className="feed_list">
<Slider { ...settings }>
{ announcements.map(( announcement, index ) => (
{ announcements !== undefined && announcements !== null && announcements.map(( announcement, index ) => (
<div className="feed_item" key={ index }>
<p className="item_title">{ announcement.title }</p>
<p className="item_desc" dangerouslySetInnerHTML={{ __html: announcement.content }}></p>

View File

@ -15,7 +15,12 @@ export default class NotificationsList extends React.Component
render()
{
const { events } = this.props;
const limit = window.innerWidth > 768 ? 5 : 3;
let limit = 5;
if (typeof window !== "undefined")
{
limit = window.innerWidth > 768 ? 5 : 3;
}
return (
<>

View File

@ -225,7 +225,7 @@ class IndexPage extends React.Component
<div className="table_cell">Следующий платеж</div>
<div className="table_cell">Дополнительные услуги</div>
</div>
{ contracts !== null && (
{ contracts !== undefined && contracts !== null && (
<>
{ contracts.length > 0 ? contracts.map((contract, index) => (
<Link href={`/contract/${ contract.number }/payments`} key={ index }>

View File

@ -36,12 +36,14 @@ export default class RequestFile extends React.Component
return (
<div className="row interactive" onClick={ this._handle_onDownloadFile }>
<p className="doc_name i-pdf extension" data-format={ file.doc_extension } style={{ flexDirection: "column", display: "flex", alignItems: "flex-start", }}>
{ file.doc_name }
<span style={{ position: "relative", color: downloading ? "#8e94a780" : "#8e94a7", }}>
Скачать документ { downloading ? (<SpinnerCircular size={ 20 } thickness={ 100 } speed={ 100 } color="rgba(236, 239, 244, 1)" secondaryColor="rgba(28, 1, 169, 1)" style={{ position: "absolute", right: 0, marginRight: "-26px", top: 0, }} />) : null }
</span>
</p>
{ file !== undefined && file !== null && (
<p className="doc_name i-pdf extension" data-format={ file.doc_extension } style={{ flexDirection: "column", display: "flex", alignItems: "flex-start", }}>
{ file.doc_name }
<span style={{ position: "relative", color: downloading ? "#8e94a780" : "#8e94a7", }}>
Скачать документ { downloading ? (<SpinnerCircular size={ 20 } thickness={ 100 } speed={ 100 } color="rgba(236, 239, 244, 1)" secondaryColor="rgba(28, 1, 169, 1)" style={{ position: "absolute", right: 0, marginRight: "-26px", top: 0, }} />) : null }
</span>
</p>
) }
</div>
)
}