mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Save server url when switching between register and login pages
This commit is contained in:
parent
a2a3134523
commit
7c5de3c131
@ -22,6 +22,7 @@ import { forwardRef, ReactNode } from "react";
|
||||
import { Platform, Pressable, TextProps, View, PressableProps, Linking } from "react-native";
|
||||
import { TextLink, useLink } from "solito/link";
|
||||
import { useTheme, useYoshiki } from "yoshiki/native";
|
||||
import type { UrlObject } from "url";
|
||||
import { alpha } from "./themes";
|
||||
|
||||
export const A = ({
|
||||
@ -31,7 +32,7 @@ export const A = ({
|
||||
target,
|
||||
...props
|
||||
}: TextProps & {
|
||||
href?: string | null;
|
||||
href?: string | UrlObject | null;
|
||||
target?: string;
|
||||
replace?: boolean;
|
||||
children: ReactNode;
|
||||
|
1
front/packages/primitives/src/types.d.ts
vendored
1
front/packages/primitives/src/types.d.ts
vendored
@ -34,7 +34,6 @@ declare module "react-native" {
|
||||
transitionDuration?: string;
|
||||
}
|
||||
interface TextProps {
|
||||
href?: string;
|
||||
hrefAttrs?: {
|
||||
rel?: "noreferrer";
|
||||
target?: string;
|
||||
|
@ -87,7 +87,8 @@ export const LoginPage: QueryPage<{ apiUrl?: string; error?: string }> = ({
|
||||
/>
|
||||
<P>
|
||||
<Trans i18nKey="login.or-register">
|
||||
Don’t have an account? <A href="/register">Register</A>.
|
||||
Don’t have an account? <A href={{ pathname: "/register", query: { apiUrl } }}>Register</A>
|
||||
.
|
||||
</Trans>
|
||||
</P>
|
||||
</FormPage>
|
||||
|
@ -98,7 +98,7 @@ export const RegisterPage: QueryPage<{ apiUrl?: string }> = ({ apiUrl }) => {
|
||||
/>
|
||||
<P>
|
||||
<Trans i18nKey="login.or-login">
|
||||
Have an account already? <A href="/login">Log in</A>.
|
||||
Have an account already? <A href={{ pathname: "/login", query: { apiUrl } }}>Log in</A>.
|
||||
</Trans>
|
||||
</P>
|
||||
</FormPage>
|
||||
|
Loading…
x
Reference in New Issue
Block a user