clean up exports and imports

This commit is contained in:
Daniel Waxweiler 2021-04-13 20:50:56 +02:00
parent 748649bde3
commit cf49fb47d6
6 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
import test from 'ava'
import { DateTimeWrapper } from './date-time-wrapper'
import DateTimeWrapper from './date-time-wrapper'
test('#getShortDate usual date', t => {
const d = new DateTimeWrapper('2020-12-24T16:45:00Z')

View File

@ -1,6 +1,6 @@
import { DateTime } from 'luxon'
export class DateTimeWrapper {
export default class DateTimeWrapper {
constructor(text) {
this.dateTime = DateTime.fromISO(text)

View File

@ -1,6 +1,6 @@
import { DateTimeWrapper } from './date-time-wrapper'
import DateTimeWrapper from './date-time-wrapper'
import * as GraphqlWrapper from './graphql-wrapper'
import * as HtmlCreator from './html-creator'
import { createAnchorElement } from './html-creator'
const NAME = '<wordpress-name>'
@ -11,7 +11,7 @@ function displayEvents(data, list) {
for (let i = 0; i < eventsCount; i++) {
const li = document.createElement('li')
const a = HtmlCreator.createAnchorElement({ text: events[i].title, url: events[i].url })
const a = createAnchorElement({ text: events[i].title, url: events[i].url })
li.appendChild(a)
const br = document.createElement('br')

View File

@ -1,6 +1,6 @@
import { SessionCache } from './session-cache'
import SessionCache from './session-cache'
import { request } from 'graphql-request'
import { DateTimeWrapper } from './date-time-wrapper'
import DateTimeWrapper from './date-time-wrapper'
export function getUpcomingEvents({ url, limit }) {
const query = `

View File

@ -1,5 +1,5 @@
import test from 'ava'
import { SessionCache } from './session-cache'
import SessionCache from './session-cache'
const fakeStorage = {

View File

@ -2,7 +2,7 @@ import hash from './object-hash-wrapper'
const MAX_AGE_IN_MS = 120000
export class SessionCache {
export default class SessionCache {
static add(storage, parameters, data) {
const key = hash(parameters)