Create shell.nix

This commit is contained in:
Zoe Roux 2023-03-08 22:08:44 +09:00
parent ea986917af
commit d67bd62393
4 changed files with 19 additions and 0 deletions

View File

@ -17,6 +17,7 @@ services:
- postgres
volumes:
- kyoo:/var/lib/kyoo
- ./cache:/var/lib/kyoo/cached
- ./video:/video
front:
build: ./front

View File

@ -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),

View File

@ -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),

12
shell.nix Normal file
View File

@ -0,0 +1,12 @@
{pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
packages = with pkgs; [
nodejs-16_x
nodePackages.yarn
(with dotnetCorePackages;
combinePackages [
sdk_6_0
aspnetcore_6_0
])
];
}