hedgedoc/src/components/landing-layout/footer/powered-by-links.tsx
Tilman Vatteroth e12dc523f8
Adjust editor config (#976)
* Adjust editor config

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2021-02-03 22:13:04 +01:00

41 lines
1.4 KiB
TypeScript

/*
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { Fragment } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import links from '../../../links.json'
import { ApplicationState } from '../../../redux'
import { ExternalLink } from '../../common/links/external-link'
import { TranslatedExternalLink } from '../../common/links/translated-external-link'
import { TranslatedInternalLink } from '../../common/links/translated-internal-link'
import { VersionInfo } from './version-info'
export const PoweredByLinks: React.FC = () => {
useTranslation()
const specialLinks = useSelector((state: ApplicationState) => Object.entries(state.config.specialLinks) as [string, string][])
return (
<p>
<Trans i18nKey="landing.footer.poweredBy">
<ExternalLink href={ links.webpage } text="HedgeDoc"/>
</Trans>
&nbsp;|&nbsp;
<TranslatedInternalLink href='/n/release-notes' i18nKey='landing.footer.releases'/>
{
specialLinks.map(([i18nKey, href]) =>
<Fragment key={ i18nKey }>
&nbsp;|&nbsp;
<TranslatedExternalLink href={ href } i18nKey={ 'landing.footer.' + i18nKey }/>
</Fragment>
)
}
&nbsp;|&nbsp;
<VersionInfo/>
</p>
)
}