fix(#2598): fixed auth page

keep-around/4734987790b7012fdad8799dc582ee3cb2df28bb
Rakov Roman 3 years ago
parent daeb0b1c06
commit 4734987790
  1. 7
      src/features/AuthServiceApp/components/Login/index.tsx
  2. 6
      src/features/AuthServiceApp/components/Registration/index.tsx
  3. 7
      src/features/CompanyInfo/index.tsx
  4. 2
      src/features/UserAccount/index.tsx
  5. 3
      src/pages/HighlightsPage/index.tsx

@ -1,6 +1,7 @@
import { T9n } from 'features/T9n' import { T9n } from 'features/T9n'
import { ArrowLoader } from 'features/ArrowLoader' import { ArrowLoader } from 'features/ArrowLoader'
import { RecoveryPopup } from 'features/AuthServiceApp/components/RecoveryPopup' import { RecoveryPopup } from 'features/AuthServiceApp/components/RecoveryPopup'
import { client } from 'features/AuthServiceApp/config/clients'
import { PAGES } from '../../config/pages' import { PAGES } from '../../config/pages'
import { LanguageSelect } from '../LanguageSelect' import { LanguageSelect } from '../LanguageSelect'
@ -123,7 +124,11 @@ const Login = () => {
</Form> </Form>
<RecoveryPopup isModalOpen={isRecoveryPopupOpen} setIsModalOpen={setIsRecoveryPopupOpen} /> <RecoveryPopup isModalOpen={isRecoveryPopupOpen} setIsModalOpen={setIsRecoveryPopupOpen} />
</CenterBlock> </CenterBlock>
<CompanyInfo textAlign='center' width='450px' /> <CompanyInfo
clientName={client.name}
textAlign='center'
width='450px'
/>
</Wrapper> </Wrapper>
) )
} }

@ -138,7 +138,11 @@ const Registration = () => {
/> />
</Form> </Form>
</CenterBlock> </CenterBlock>
<CompanyInfo textAlign='center' width='450px' /> <CompanyInfo
clientName={client.name}
textAlign='center'
width='450px'
/>
</Wrapper> </Wrapper>
) )
} }

@ -4,7 +4,6 @@ import { T9n } from 'features/T9n'
import { useLexicsConfig } from 'features/LexicsStore' import { useLexicsConfig } from 'features/LexicsStore'
import { PAGES } from 'config' import { PAGES } from 'config'
import { client } from 'config/clients'
import { ClientNames } from 'config/clients/types' import { ClientNames } from 'config/clients/types'
import { import {
@ -15,18 +14,20 @@ import {
import { lexics } from './config' import { lexics } from './config'
export type TCompanyInfo = { export type TCompanyInfo = {
clientName: ClientNames,
textAlign?: 'center' | 'left', textAlign?: 'center' | 'left',
width?: string, width?: string,
} }
export const CompanyInfo = ({ export const CompanyInfo = ({
clientName,
textAlign = 'left', textAlign = 'left',
width = '100%', width = '100%',
}: TCompanyInfo) => { }: TCompanyInfo) => {
useLexicsConfig(lexics) useLexicsConfig(lexics)
const companyInfoContent = useMemo(() => { const companyInfoContent = useMemo(() => {
switch (client.name) { switch (clientName) {
case ClientNames.Facr: case ClientNames.Facr:
return ( return (
<Fragment> <Fragment>
@ -62,7 +63,7 @@ export const CompanyInfo = ({
</Fragment> </Fragment>
) )
} }
}, []) }, [clientName])
return ( return (
<CompanyInfoWrapper style={{ maxWidth: width, textAlign }}> <CompanyInfoWrapper style={{ maxWidth: width, textAlign }}>

@ -106,7 +106,7 @@ const UserAccount = () => {
<Route path={`${PAGES.useraccount}/payment-history`}> <Route path={`${PAGES.useraccount}/payment-history`}>
<PagePaymentsHistory /> <PagePaymentsHistory />
</Route> </Route>
<CompanyInfo textAlign='left' /> <CompanyInfo clientName={client.name} textAlign='left' />
</ContentWrapper> </ContentWrapper>
</Body> </Body>
{client.name !== 'instat' && <PoweredByInstat />} {client.name !== 'instat' && <PoweredByInstat />}

@ -3,6 +3,7 @@ import { Link } from 'react-router-dom'
import { isMobileDevice } from 'config/userAgent' import { isMobileDevice } from 'config/userAgent'
import { PAGES } from 'config' import { PAGES } from 'config'
import { client } from 'config/clients'
import { isBoolean } from 'lodash' import { isBoolean } from 'lodash'
@ -78,7 +79,7 @@ const HighlightsPage = () => {
</ScPrice> </ScPrice>
</ScButton> </ScButton>
</ScButtonWrap> </ScButtonWrap>
<CompanyInfo textAlign='center' /> <CompanyInfo clientName={client.name} textAlign='center' />
<ChangeCardPopup <ChangeCardPopup
btnName='buy_subscription' btnName='buy_subscription'
changeCardPopupOpen={isOpenPopupChangeCard} changeCardPopupOpen={isOpenPopupChangeCard}

Loading…
Cancel
Save