move log to util.js
This commit is contained in:
parent
267ddc890f
commit
5cae7b9658
2 changed files with 10 additions and 10 deletions
|
@ -1,18 +1,10 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
|
import './App.css';
|
||||||
import Service from './Service.js';
|
import Service from './Service.js';
|
||||||
import ServicePlaceholder from './ServicePlaceholder.js';
|
import ServicePlaceholder from './ServicePlaceholder.js';
|
||||||
import './App.css';
|
|
||||||
import OP from './ws/op.js';
|
import OP from './ws/op.js';
|
||||||
|
import { log } from './util.js';
|
||||||
const log = (...args) => {
|
|
||||||
console.log(
|
|
||||||
'%c[elstat]%c',
|
|
||||||
'color: purple; font-weight: bold',
|
|
||||||
'color: inherit; font-weight: inherit',
|
|
||||||
...args,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const DOMAIN = 'https://elstatus.stayathomeserver.club';
|
const DOMAIN = 'https://elstatus.stayathomeserver.club';
|
||||||
// const ENDPOINT = 'http://localhost:8069/api/status'
|
// const ENDPOINT = 'http://localhost:8069/api/status'
|
||||||
|
|
8
priv/frontend/src/util.js
Normal file
8
priv/frontend/src/util.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
export function log(...args) {
|
||||||
|
console.log(
|
||||||
|
'%c[elstat]%c',
|
||||||
|
'color: purple; font-weight: bold',
|
||||||
|
'color: inherit; font-weight: inherit',
|
||||||
|
...args,
|
||||||
|
);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue