mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Create shell.nix
This commit is contained in:
parent
ea986917af
commit
d67bd62393
@ -17,6 +17,7 @@ services:
|
||||
- postgres
|
||||
volumes:
|
||||
- kyoo:/var/lib/kyoo
|
||||
- ./cache:/var/lib/kyoo/cached
|
||||
- ./video:/video
|
||||
front:
|
||||
build: ./front
|
||||
|
@ -24,6 +24,7 @@ import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Platform } from "react-native";
|
||||
import { Trans } from "react-i18next";
|
||||
import { useRouter } from 'solito/router'
|
||||
import { percent, px, useYoshiki } from "yoshiki/native";
|
||||
import { DefaultLayout } from "../layout";
|
||||
import { FormPage } from "./form";
|
||||
@ -34,6 +35,7 @@ export const LoginPage: QueryPage = () => {
|
||||
const [password, setPassword] = useState("");
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useTranslation();
|
||||
const { css } = useYoshiki();
|
||||
|
||||
@ -64,6 +66,7 @@ export const LoginPage: QueryPage = () => {
|
||||
onPress={async () => {
|
||||
const error = await loginFunc("login", {username, password});
|
||||
setError(error);
|
||||
if (!error) router.push("/");
|
||||
}}
|
||||
{...css({
|
||||
m: ts(1),
|
||||
|
@ -24,6 +24,7 @@ import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Platform } from "react-native";
|
||||
import { Trans } from "react-i18next";
|
||||
import { useRouter } from 'solito/router'
|
||||
import { percent, px, useYoshiki } from "yoshiki/native";
|
||||
import { DefaultLayout } from "../layout";
|
||||
import { FormPage } from "./form";
|
||||
@ -36,6 +37,7 @@ export const RegisterPage: QueryPage = () => {
|
||||
const [confirm, setConfirm] = useState("");
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useTranslation();
|
||||
const { css } = useYoshiki();
|
||||
|
||||
@ -79,6 +81,7 @@ export const RegisterPage: QueryPage = () => {
|
||||
onPress={async () => {
|
||||
const error = await loginFunc("register", { email, username, password });
|
||||
setError(error);
|
||||
if (!error) router.push("/");
|
||||
}}
|
||||
{...css({
|
||||
m: ts(1),
|
||||
|
Loading…
x
Reference in New Issue
Block a user