mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 08:34:54 -04:00
Switch the base framework from Create React App to Next.JS
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
a979b6ffdd
commit
77a60c6c48
361 changed files with 5130 additions and 9605 deletions
|
@ -8,12 +8,12 @@ import React, { useMemo } from 'react'
|
|||
import { Button } from 'react-bootstrap'
|
||||
import type { ButtonProps } from 'react-bootstrap/Button'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { LinkContainer } from 'react-router-bootstrap'
|
||||
import { ShowIf } from '../../common/show-if/show-if'
|
||||
import { INTERACTIVE_LOGIN_METHODS } from '../../../api/auth'
|
||||
import { useApplicationState } from '../../../hooks/common/use-application-state'
|
||||
import { cypressId } from '../../../utils/cypress-attribute'
|
||||
import { useBackendBaseUrl } from '../../../hooks/common/use-backend-base-url'
|
||||
import Link from 'next/link'
|
||||
|
||||
export type SignInButtonProps = Omit<ButtonProps, 'href'>
|
||||
|
||||
|
@ -37,11 +37,11 @@ export const SignInButton: React.FC<SignInButtonProps> = ({ variant, ...props })
|
|||
|
||||
return (
|
||||
<ShowIf condition={authEnabled}>
|
||||
<LinkContainer to={loginLink} title={t('login.signIn')}>
|
||||
<Button {...cypressId('sign-in-button')} variant={variant || 'success'} {...props}>
|
||||
<Link href={loginLink} passHref={true}>
|
||||
<Button title={t('login.signIn')} {...cypressId('sign-in-button')} variant={variant || 'success'} {...props}>
|
||||
<Trans i18nKey='login.signIn' />
|
||||
</Button>
|
||||
</LinkContainer>
|
||||
</Link>
|
||||
</ShowIf>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue