diff --git a/src/containers/Logs/index.tsx b/src/containers/Logs/index.tsx index be9cf49..9a04cda 100644 --- a/src/containers/Logs/index.tsx +++ b/src/containers/Logs/index.tsx @@ -1,13 +1,76 @@ import * as React from 'react' +import * as dayjs from 'dayjs' import { Card, Header } from '@components' import './style.scss' -export default class Logs extends React.Component<{}, {}> { +interface LogsState { + listHeight: number +} + +export default class Logs extends React.Component<{}, LogsState> { + state: LogsState = { + listHeight: 0 + } + + componentDidMount () { + this.setListHeight() + } + + setListHeight = () => { + this.setState({ + listHeight: document.querySelector('.logs-card').clientHeight - 30 + }) + } + render () { + const logs = [ + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() }, + { type: 'info', payload: 'google.com match DomainSuffix using Proxy', timestamp: +new Date() } + ] + + const listHeight = { height: this.state.listHeight } return (