Skip to content

Commit

Permalink
perf: debugCount 10 to 5
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidZORO committed Jun 3, 2020
1 parent 932d994 commit 5614f84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import cx from 'classnames';
import { Button, message } from 'antd';
import { Button } from 'antd';

import { buildConfig } from '@leaa/dashboard/src/configs';
import { setDebugMode, isDebugMode } from '@leaa/dashboard/src/utils/debug.util';
Expand All @@ -15,8 +15,7 @@ export const BuildInfo = (props: IProps) => {
const [debugCount, setDebugCount] = useState<number>(0);

useEffect(() => {
if (debugCount === 7) message.loading('💪 Keep To 10!');
if (debugCount === 10) {
if (debugCount === 5) {
console.log('HAAAAAAAAAAAAAAAAAA!');
setDebugMode(!isDebugMode());

Expand All @@ -33,7 +32,7 @@ export const BuildInfo = (props: IProps) => {
<span>MODE:</span>
<Button type="link" size="small" className={style['switch-debug-module']} onClick={onAdd}>
<strong>{buildConfig.MODE}</strong>
<span className={style['switch-debug-bar']} style={{ width: debugCount * 5 }} />
<span className={style['switch-debug-bar']} style={{ width: debugCount * 10 }} />
</Button>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
padding: 1px 0;

&:hover {
color: #000;
color: @primary-color;
}
}

Expand Down

0 comments on commit 5614f84

Please sign in to comment.