Add function to determine mobile viewport

This commit is contained in:
Mathias Schopmans
2017-04-03 16:06:51 +02:00
parent b37849206f
commit b14d7ab319

View File

@@ -34,4 +34,9 @@ const messages = {
export const translate = (key) => (messages[key] || '-');
export function isMobileViewport() {
const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
return width < 1200;
}
const formatRelease = (release) => moment(release, 'YYYY-MM-DD').format('MMM YYYY');