Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var React = require('react')
var ReactFireMixin = require('reactfire')
var TimeAgo = require('react-timeago').default
var HNService = require('./services/HNService')
var Spinner = require('./Spinner')
var setTitle = require('./utils/setTitle')
// TODO User submissions
// TODO User comments
var UserProfile = React.createClass({
mixins: [ReactFireMixin],
getInitialState() {
return {user: {}}
},
var React = require('react')
var Link = require('react-router/lib/Link')
var TimeAgo = require('react-timeago').default
var ItemStore = require('../stores/ItemStore')
var SettingsStore = require('../stores/SettingsStore')
var Spinner = require('../Spinner')
var pluralise = require('../utils/pluralise')
var CommentMixin = {
fetchAncestors(comment) {
ItemStore.fetchCommentAncestors(comment, result => {
if (process.env.NODE_ENV !== 'production') {
console.info(
'fetchAncestors(' + comment.id + ') took ' +
result.timeTaken + ' ms for ' +
result.itemCount + ' item' + pluralise(result.itemCount) + ' with ' +
var React = require('react')
var Link = require('react-router/lib/Link')
var TimeAgo = require('react-timeago').default
var SettingsStore = require('../stores/SettingsStore')
var pluralise = require('../utils/pluralise')
var urlParse = require('url-parse')
var parseHost = function(url) {
var hostname = (urlParse(url, true)).hostname
var parts = hostname.split('.').slice(-3)
if (parts[0] === 'www') {
parts.shift()
}
return parts.join('.')
}
/**
* Reusable logic for displaying an item.
var React = require('react')
var ReactFireMixin = require('reactfire')
var TimeAgo = require('react-timeago').default
var HNService = require('./services/HNService')
var HNServiceRest = require('./services/HNServiceRest')
var StoryCommentThreadStore = require('./stores/StoryCommentThreadStore')
var ItemStore = require('./stores/ItemStore')
var Comment = require('./Comment')
var PollOption = require('./PollOption')
var Spinner = require('./Spinner')
var ItemMixin = require('./mixins/ItemMixin')
var cx = require('./utils/buildClassName')
var setTitle = require('./utils/setTitle')
var SettingsStore = require('./stores/SettingsStore')