summaryrefslogtreecommitdiff
path: root/src/components/Logs.js
diff options
context:
space:
mode:
authorHaishan <[email protected]>2019-03-31 00:08:46 +0800
committerHaishan <[email protected]>2019-03-31 00:21:10 +0800
commit2a9de5ea106d3fd1f966dfe2c8cf8a34fa4193d1 (patch)
tree59a66170f5800c7acb8fc84da419821d94a6a124 /src/components/Logs.js
parente9518ba36a5dc7f90f41a5548b9b2c67e8e23d9c (diff)
icon: using svg component for the logo
Diffstat (limited to 'src/components/Logs.js')
-rw-r--r--src/components/Logs.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/components/Logs.js b/src/components/Logs.js
index 424765a..8fba941 100644
--- a/src/components/Logs.js
+++ b/src/components/Logs.js
@@ -4,7 +4,7 @@ import cx from 'classnames';
import { useStoreState, useActions } from 'm/store';
import { getClashAPIConfig } from 'd/app';
-import Icon from 'c/Icon';
+import SvgYacd from './SvgYacd';
import { FixedSizeList as List, areEqual } from 'react-window';
import ContentHeader from 'c/ContentHeader';
import useRemainingViewPortHeight from '../hooks/useRemainingViewPortHeight';
@@ -13,8 +13,6 @@ import { fetchLogs } from '../api/logs';
import LogSearch from './LogSearch';
import { getLogsForDisplay, appendLog } from 'd/logs';
-import yacd from 's/yacd.svg';
-
import s0 from 'c/Logs.module.scss';
const paddingBottom = 30;
const colors = {
@@ -69,12 +67,9 @@ export default function Logs() {
const { appendLog } = useActions(actions);
const logs = useStoreState(getLogsForDisplay);
- useEffect(
- () => {
- fetchLogs({ hostname, port, secret }, appendLog);
- },
- [hostname, port, secret]
- );
+ useEffect(() => {
+ fetchLogs({ hostname, port, secret }, appendLog);
+ }, [hostname, port, secret]);
const [refLogsContainer, containerHeight] = useRemainingViewPortHeight();
return (
@@ -88,7 +83,7 @@ export default function Logs() {
style={{ height: containerHeight - paddingBottom }}
>
<div className={s0.logPlaceholderIcon}>
- <Icon id={yacd.id} width={200} height={200} />
+ <SvgYacd width={200} height={200} />
</div>
<div>No logs yet, hang tight...</div>
</div>