@sanity/dashboard
Advanced tools
Comparing version 0.140.22 to 0.140.24
@@ -14,4 +14,2 @@ "use strict"; | ||
var _dateFns = require("date-fns"); | ||
var _Tutorial = _interopRequireDefault(require("./Tutorial")); | ||
@@ -75,3 +73,3 @@ | ||
var presenter = feedItem.presenter || (0, _get2.default)(feedItem, 'guideOrTutorial.presenter') || {}; | ||
var date = (0, _get2.default)(feedItem, 'guideOrTutorial._createdAt'); | ||
var subtitle = (0, _get2.default)(feedItem, 'category'); | ||
var _feedItem$guideOrTuto = feedItem.guideOrTutorial, | ||
@@ -85,3 +83,3 @@ guideOrTutorial = _feedItem$guideOrTuto === void 0 ? {} : _feedItem$guideOrTuto; | ||
presenterName: presenter.name, | ||
presenterSubtitle: `${(0, _dateFns.distanceInWords)(new Date(date), new Date())} ago`, | ||
presenterSubtitle: subtitle, | ||
showPlayIcon: feedItem.hasVideo, | ||
@@ -88,0 +86,0 @@ posterURL: urlBuilder.image(feedItem.poster).height(360).url() |
{ | ||
"name": "@sanity/dashboard", | ||
"version": "0.140.22", | ||
"version": "0.140.24", | ||
"description": "Tool for rendering dashboard widgets", | ||
@@ -24,3 +24,4 @@ "main": "src/DashboardTool.js", | ||
"dependencies": { | ||
"lodash": "^4.17.4" | ||
"lodash": "^4.17.4", | ||
"react-icons": "^2.2.7" | ||
}, | ||
@@ -30,9 +31,3 @@ "devDependencies": { | ||
"@sanity/check": "0.140.3", | ||
"history": "^4.6.3", | ||
"jest": "^23.6.0", | ||
"postcss-cssnext": "^3.0.2", | ||
"prop-types": "^15.6.0", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"react-icons": "^2.2.7", | ||
"rimraf": "^2.6.2" | ||
@@ -52,3 +47,3 @@ }, | ||
"homepage": "https://www.sanity.io/", | ||
"gitHead": "17908030e796a404c8d31bde3baf25775e4b17a5" | ||
"gitHead": "75f05e3c8f25b165e6e5e1aab91edd2479dd92d3" | ||
} |
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import {get} from 'lodash' | ||
import {distanceInWords} from 'date-fns' | ||
import Tutorial from './Tutorial' | ||
@@ -45,2 +44,3 @@ import styles from './SanityTutorials.css' | ||
const title = 'Learn about Sanity' | ||
return ( | ||
@@ -57,3 +57,3 @@ <div className={styles.root}> | ||
const presenter = feedItem.presenter || get(feedItem, 'guideOrTutorial.presenter') || {} | ||
const date = get(feedItem, 'guideOrTutorial._createdAt') | ||
const subtitle = get(feedItem, 'category') | ||
const {guideOrTutorial = {}} = feedItem | ||
@@ -68,3 +68,3 @@ return ( | ||
presenterName={presenter.name} | ||
presenterSubtitle={`${distanceInWords(new Date(date), new Date())} ago`} | ||
presenterSubtitle={subtitle} | ||
showPlayIcon={feedItem.hasVideo} | ||
@@ -71,0 +71,0 @@ posterURL={urlBuilder |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4
0
76115
4
+ Addedreact-icons@^2.2.7
+ Addedreact-dom@16.14.0(transitive)
+ Addedreact-icon-base@2.1.0(transitive)
+ Addedreact-icons@2.2.7(transitive)
+ Addedscheduler@0.19.1(transitive)