File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change 1- import { toast } from 'react-toastify' ;
2- import { toastConstants } from '../constants' ;
1+ import { toast } from 'react-toastify' ;
2+ import { toastConstants } from '../constants' ;
33import React from 'react' ;
4- import { API } from './api' ;
4+ import { API } from './api' ;
55
66const HTMLToastContent = ( { htmlContent } ) => {
77 return < div dangerouslySetInnerHTML = { { __html : htmlContent } } /> ;
@@ -74,6 +74,7 @@ if (isMobile()) {
7474}
7575
7676export function showError ( error ) {
77+ if ( ! error ) return ;
7778 console . error ( error ) ;
7879 if ( error . message ) {
7980 if ( error . name === 'AxiosError' ) {
@@ -158,17 +159,7 @@ export function timestamp2string(timestamp) {
158159 second = '0' + second ;
159160 }
160161 return (
161- year +
162- '-' +
163- month +
164- '-' +
165- day +
166- ' ' +
167- hour +
168- ':' +
169- minute +
170- ':' +
171- second
162+ year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
172163 ) ;
173164}
174165
@@ -193,7 +184,6 @@ export const verifyJSON = (str) => {
193184export function shouldShowPrompt ( id ) {
194185 let prompt = localStorage . getItem ( `prompt-${ id } ` ) ;
195186 return ! prompt ;
196-
197187}
198188
199189export function setPromptShown ( id ) {
You can’t perform that action at this time.
0 commit comments