import { IOfflineData } from '@client/offline/reducer' ; import { getOfflineData } from '@client/offline/selectors' ; import { IStoreState } from '@client/store' ; import * as React from 'react' ; import { injectIntl , WrappedComponentProps } from 'react-intl' ; import { connect } from 'react-redux' ; import { RouteComponentProps } from 'react-router' ; import styled from 'styled-components' ; import { SysAdminContentWrapper } from '@client/views/SysAdmin/SysAdminContentWrapper' ; import { Container } from '@opencrvs/components/lib/layout' ; import { LinkButton } from '@opencrvs/components/lib/buttons' ; import { messages } from '@client/i18n/messages/views/config' ; const HeaderContainer = styled . div `
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;

  & > :first-child {
    margin-right: 24px;
  }
` ; type Props = WrappedComponentProps & Pick < RouteComponentProps , 'history' > & { offlineResources : IOfflineData ; } ; class ConfigHomeComponent extends React . Component < Props > { render ( ) { const { intl , offlineResources } = this . props ; return ( < SysAdminContentWrapper > < Container > < HeaderContainer > < LinkButton id = "go-to-application-settings" className = "item" onClick = { ( ) => { } } > { intl . formatMessage ( messages . applicationSettings ) } < /LinkButton> < LinkButton id = "go-to-certificate-configuration" className = "item" onClick = { ( ) => { } } > { intl . formatMessage ( messages . certificateConfiguration ) } < /LinkButton> < /HeaderContainer> < /Container> < /SysAdminContentWrapper>); } } function mapStateToProps ( state ) { return { offlineResources : getOfflineData ( state ) } ; } export const ConfigHome = connect ( mapStateToProps ) ( injectIntl ( ConfigHomeComponent ) ) ;