Chain.jsx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // @flow
  2. // Copyright 2019 The go-ethereum Authors
  3. // This file is part of the go-ethereum library.
  4. //
  5. // The go-ethereum library is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU Lesser General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // The go-ethereum library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
  17. import React, {Component} from 'react';
  18. import type {Chain as ChainType} from '../types/content';
  19. export const inserter = () => (update: ChainType, prev: ChainType) => {
  20. if (!update.currentBlock) {
  21. return;
  22. }
  23. if (!prev.currentBlock) {
  24. prev.currentBlock = {};
  25. }
  26. prev.currentBlock.number = update.currentBlock.number;
  27. prev.currentBlock.timestamp = update.currentBlock.timestamp;
  28. return prev;
  29. };
  30. // styles contains the constant styles of the component.
  31. const styles = {};
  32. // themeStyles returns the styles generated from the theme for the component.
  33. const themeStyles = theme => ({});
  34. export type Props = {
  35. content: Content,
  36. };
  37. type State = {};
  38. // Logs renders the log page.
  39. class Chain extends Component<Props, State> {
  40. render() {
  41. return <></>;
  42. }
  43. }
  44. export default Chain;