diff --git a/priv/frontend/src/App.js b/priv/frontend/src/App.js index eac917a..5498b5b 100644 --- a/priv/frontend/src/App.js +++ b/priv/frontend/src/App.js @@ -1,18 +1,10 @@ import React, { Component } from 'react'; +import './App.css'; import Service from './Service.js'; import ServicePlaceholder from './ServicePlaceholder.js'; -import './App.css'; import OP from './ws/op.js'; - -const log = (...args) => { - console.log( - '%c[elstat]%c', - 'color: purple; font-weight: bold', - 'color: inherit; font-weight: inherit', - ...args, - ); -}; +import { log } from './util.js'; const DOMAIN = 'https://elstatus.stayathomeserver.club'; // const ENDPOINT = 'http://localhost:8069/api/status' diff --git a/priv/frontend/src/util.js b/priv/frontend/src/util.js new file mode 100644 index 0000000..dee96d7 --- /dev/null +++ b/priv/frontend/src/util.js @@ -0,0 +1,8 @@ +export function log(...args) { + console.log( + '%c[elstat]%c', + 'color: purple; font-weight: bold', + 'color: inherit; font-weight: inherit', + ...args, + ); +}