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.
const TimeAgoI18N = ({date, activeLanguage}) => {
const formatter = buildFormatter(timeLanguages[activeLanguage]);
return ;
};
public render() {
const formatter = buildFormatter(englishStrings);
const cacheTime = new Date();
return (
<div>
</div>
);
}
}
Row,
Col,
Statistic,
Icon,
Card,
} from "antd";
import Helmet from "react-helmet-async";
import Highlighter from "react-highlight-words";
import { debounce } from "debounce";
import styled from "styled-components";
import TimeAgo from "react-timeago";
import viStrings from "react-timeago/lib/language-strings/vi";
import buildFormatter from "react-timeago/lib/formatters/buildFormatter";
const formatter = buildFormatter(viStrings);
const { Content } = Layout;
const Search = Input.Search;
const ConfessContent = styled.div`
white-space: pre-line;
`;
class SearchPage extends PureComponent {
state = {
initLoading : true,
loading : false,
data : [],
list : [],
isSearchMode : false,
searchKeyword: "",
render() {
const formatter = buildFormatter(dutchStrings);
var year = this.props.latest_change_date ?
parseInt(this.props.latest_change_date.substr(0, 4), 10) : 0;
if (year > 2000) {
return (
<span>
gewijzigd
</span>
);
}
return '';
}
}
render() {
const formatter = buildFormatter(brazilianStrings)
const { polls } = this.state
const token = getCookie('hackdisrupt')
const createNewBtn = token ? (
<button size="small">criar uma poll</button>
) : (
undefined
)
const list = polls ? (
polls.map(({ _id, owner, createdAt, title, description }) => {
return (
<li>
</li>
month: '大约 1 个月',
months: '%d 月',
year: '大约 1 年',
years: '%d 年',
wordSeparator: ''
};
const metaLocale = document.querySelector('meta[name=locale]');
let locale = "en";
if (metaLocale) {
locale = metaLocale.getAttribute("content");
}
let formatter;
if (locale === "zh-CN") {
formatter = buildFormatter(cnStrings)
} else {
formatter = buildFormatter(enStrings)
}
export class Timeago extends React.Component {
render() {
let { value, time } = this.props;
if (!value) {
value = time;
}
return
}
}
Layout,
message,
Progress,
List,
Skeleton,
Card,
} from "antd";
import GoogleLogin from "react-google-login";
import TimeAgo from "react-timeago";
import viStrings from "react-timeago/lib/language-strings/vi";
import buildFormatter from "react-timeago/lib/formatters/buildFormatter";
const { Content } = Layout;
const formatter = buildFormatter(viStrings);
function ChangeForm() {
const [loading, setLoading] = useState(false);
const [isSigned, setIsSigned] = useState(false);
const [signList, setSignList] = useState([]);
const [count, setCount] = useState(0);
useEffect(() => {
let fake = null;
setLoading(true);
FPTUSDK.change
.getSignList()
.then(data => {
setSignList(data.list);
setCount(data.count || 0);