@mentor-medier/author-bio-block
Advanced tools
Comparing version 0.0.0-beta.2f66b88 to 0.0.0-beta.3012b7c
@@ -6,2 +6,74 @@ # Change Log | ||
## [5.11.2](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.11.1...v5.11.2) (2021-05-03) | ||
## [5.10.4](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.10.3...v5.10.4) (2021-03-24) | ||
## [5.10.3](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.10.2...v5.10.3) (2021-03-12) | ||
## [5.9.15](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.14...v5.9.15) (2021-01-14) | ||
## [5.9.12](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.11-alpha.0...v5.9.12) (2021-01-10) | ||
## [5.9.5](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.4...v5.9.5) (2020-12-22) | ||
## [5.9.4](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.3...v5.9.4) (2020-12-22) | ||
## [5.9.3](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.2...v5.9.3) (2020-12-22) | ||
## [5.9.2](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.1...v5.9.2) (2020-12-22) | ||
**Note:** Version bump only for package @mentor-medier/author-bio-block | ||
## [5.11.1](https://github.com/WPMedia/fusion-news-theme-blocks/compare/v5.11.1-hotfix.0...v5.11.1) (2021-04-26) | ||
**Note:** Version bump only for package @wpmedia/author-bio-block | ||
## [5.10.3](https://github.com/WPMedia/fusion-news-theme-blocks/compare/v5.10.3-hotfix.0...v5.10.3) (2021-04-13) | ||
**Note:** Version bump only for package @wpmedia/author-bio-block | ||
## [5.10.2](https://github.com/WPMedia/fusion-news-theme-blocks/compare/v5.10.0...v5.10.2) (2021-03-30) | ||
**Note:** Version bump only for package @wpmedia/author-bio-block | ||
## [5.10.1](https://github.com/WPMedia/fusion-news-theme-blocks/compare/v5.10.0...v5.10.1) (2021-03-30) | ||
**Note:** Version bump only for package @wpmedia/author-bio-block | ||
## [5.9.2](https://github.com/WPMedia/fusion-news-theme-blocks/compare/v5.9.1...v5.9.2) (2021-01-14) | ||
@@ -8,0 +80,0 @@ |
import React, { Fragment } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { useFusionContext } from 'fusion:context'; | ||
@@ -22,2 +23,4 @@ import getThemeStyle from 'fusion:themes'; | ||
RssIcon, | ||
LazyLoad, | ||
isServerSide, | ||
} from '@wpmedia/engine-theme-sdk'; | ||
@@ -87,3 +90,3 @@ import getProperties from 'fusion:properties'; | ||
const AuthorBio = () => { | ||
const AuthorBioItems = () => { | ||
const { globalContent: content, arcSite } = useFusionContext(); | ||
@@ -345,4 +348,26 @@ const { credits = {} } = content; | ||
const AuthorBio = ({ customFields = {} }) => { | ||
const { isAdmin } = useFusionContext(); | ||
if (customFields.lazyLoad && isServerSide() && !isAdmin) { // On Server | ||
return null; | ||
} | ||
return ( | ||
<LazyLoad enabled={customFields.lazyLoad && !isAdmin}> | ||
<AuthorBioItems customFields={{ ...customFields }} /> | ||
</LazyLoad> | ||
); | ||
}; | ||
AuthorBio.label = 'Short Author Bio – Arc Block'; | ||
AuthorBio.propTypes = { | ||
customFields: PropTypes.shape({ | ||
lazyLoad: PropTypes.bool.tag({ | ||
name: 'Lazy Load block?', | ||
defaultValue: false, | ||
description: 'Turning on lazy-loading will prevent this block from being loaded on the page until it is nearly in-view for the user.', | ||
}), | ||
}), | ||
}; | ||
export default AuthorBio; |
{ | ||
"name": "@mentor-medier/author-bio-block", | ||
"version": "0.0.0-beta.2f66b88", | ||
"version": "0.0.0-beta.3012b7c", | ||
"description": "Fusion News Theme byline block", | ||
@@ -32,3 +32,3 @@ "author": "SangHee Kim <sanghee.kim@washpost.com>", | ||
}, | ||
"gitHead": "2f66b88ff190572fbadd85a120086d5aa8699088" | ||
"gitHead": "3012b7cad5382a946b7552def32e821488b62bc7" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23249
387