Fix broken next version

This commit is contained in:
Zoe Roux 2023-09-04 23:54:19 +02:00
parent 4c705a4605
commit d394c390f7
No known key found for this signature in database
5 changed files with 56 additions and 57 deletions

View File

@ -1,5 +1,4 @@
FROM node:16-alpine AS builder
RUN apk add git bash
WORKDIR /app
COPY .yarn ./.yarn
COPY .yarnrc.yml ./

View File

@ -24,7 +24,7 @@
"jotai": "^2.3.1",
"libass-wasm": "^4.1.0",
"moti": "^0.26.0",
"next": "13.4.13",
"next": "13.4.19",
"next-translate": "^2.5.3",
"raf": "^3.4.1",
"react": "18.2.0",

View File

@ -34,10 +34,8 @@ import {
} from "@kyoo/primitives";
import { Platform, TextInput, View, ViewProps } from "react-native";
import { useTranslation } from "react-i18next";
import { createParam } from "solito";
import { useRouter } from "solito/router";
import { Stylable, useYoshiki } from "yoshiki/native";
import MenuIcon from "@material-symbols/svg-400/rounded/menu-fill.svg";
import Search from "@material-symbols/svg-400/rounded/search-fill.svg";
import Login from "@material-symbols/svg-400/rounded/login.svg";
import Register from "@material-symbols/svg-400/rounded/app_registration.svg";
@ -58,16 +56,15 @@ export const NavbarTitle = (props: Stylable & { onLayout?: ViewProps["onLayout"]
);
};
const { useParam } = createParam<{ q?: string }>();
const SearchBar = forwardRef<TextInput, Stylable>(function SearchBar(props, ref) {
const { css, theme } = useYoshiki();
const { t } = useTranslation();
const { push, replace, back } = useRouter();
const hasChanged = useRef<boolean>(false);
const [query, setQuery] = useState("");
useEffect(() => {
if (Platform.OS !== "web") return;
if (Platform.OS !== "web" || !hasChanged.current) return;
const action = window.location.pathname.startsWith("/search") ? replace : push;
if (query) action(`/search?q=${encodeURI(query)}`, undefined, { shallow: true });
else back();
@ -77,7 +74,10 @@ const SearchBar = forwardRef<TextInput, Stylable>(function SearchBar(props, ref)
<Input
ref={ref}
value={query ?? ""}
onChangeText={setQuery}
onChangeText={(q) => {
hasChanged.current = true;
setQuery(q);
}}
placeholder={t("navbar.search")}
placeholderTextColor={theme.light.overlay0}
{...tooltip(t("navbar.search"))}

View File

@ -2665,10 +2665,10 @@ __metadata:
languageName: node
linkType: hard
"@next/env@npm:13.4.13":
version: 13.4.13
resolution: "@next/env@npm:13.4.13"
checksum: 94935ff1730de9fe00be238256ad1af3e5da7ae737e6ce5d261404ccc9245f2a18fee24afa7f3b27d7f7d1c16e2715c8eccb70260ab0c0a08e7bbaa95ed36211
"@next/env@npm:13.4.19":
version: 13.4.19
resolution: "@next/env@npm:13.4.19"
checksum: ace4f82890954ade0164fbe2b7ff988268d2b99b2e80caa6707c51fa4cbfaaa31e48fbbcecd4fd142af3503c544e1b4c91e8185d4af253c8fb46550e9e70ad7e
languageName: node
linkType: hard
@ -2681,65 +2681,65 @@ __metadata:
languageName: node
linkType: hard
"@next/swc-darwin-arm64@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-darwin-arm64@npm:13.4.13"
"@next/swc-darwin-arm64@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-darwin-arm64@npm:13.4.19"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@next/swc-darwin-x64@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-darwin-x64@npm:13.4.13"
"@next/swc-darwin-x64@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-darwin-x64@npm:13.4.19"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@next/swc-linux-arm64-gnu@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-linux-arm64-gnu@npm:13.4.13"
"@next/swc-linux-arm64-gnu@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-linux-arm64-gnu@npm:13.4.19"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@next/swc-linux-arm64-musl@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-linux-arm64-musl@npm:13.4.13"
"@next/swc-linux-arm64-musl@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-linux-arm64-musl@npm:13.4.19"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@next/swc-linux-x64-gnu@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-linux-x64-gnu@npm:13.4.13"
"@next/swc-linux-x64-gnu@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-linux-x64-gnu@npm:13.4.19"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@next/swc-linux-x64-musl@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-linux-x64-musl@npm:13.4.13"
"@next/swc-linux-x64-musl@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-linux-x64-musl@npm:13.4.19"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@next/swc-win32-arm64-msvc@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-win32-arm64-msvc@npm:13.4.13"
"@next/swc-win32-arm64-msvc@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-win32-arm64-msvc@npm:13.4.19"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@next/swc-win32-ia32-msvc@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-win32-ia32-msvc@npm:13.4.13"
"@next/swc-win32-ia32-msvc@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-win32-ia32-msvc@npm:13.4.19"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@next/swc-win32-x64-msvc@npm:13.4.13":
version: 13.4.13
resolution: "@next/swc-win32-x64-msvc@npm:13.4.13"
"@next/swc-win32-x64-msvc@npm:13.4.19":
version: 13.4.19
resolution: "@next/swc-win32-x64-msvc@npm:13.4.19"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
@ -10692,20 +10692,20 @@ __metadata:
languageName: node
linkType: hard
"next@npm:13.4.13":
version: 13.4.13
resolution: "next@npm:13.4.13"
"next@npm:13.4.19":
version: 13.4.19
resolution: "next@npm:13.4.19"
dependencies:
"@next/env": 13.4.13
"@next/swc-darwin-arm64": 13.4.13
"@next/swc-darwin-x64": 13.4.13
"@next/swc-linux-arm64-gnu": 13.4.13
"@next/swc-linux-arm64-musl": 13.4.13
"@next/swc-linux-x64-gnu": 13.4.13
"@next/swc-linux-x64-musl": 13.4.13
"@next/swc-win32-arm64-msvc": 13.4.13
"@next/swc-win32-ia32-msvc": 13.4.13
"@next/swc-win32-x64-msvc": 13.4.13
"@next/env": 13.4.19
"@next/swc-darwin-arm64": 13.4.19
"@next/swc-darwin-x64": 13.4.19
"@next/swc-linux-arm64-gnu": 13.4.19
"@next/swc-linux-arm64-musl": 13.4.19
"@next/swc-linux-x64-gnu": 13.4.19
"@next/swc-linux-x64-musl": 13.4.19
"@next/swc-win32-arm64-msvc": 13.4.19
"@next/swc-win32-ia32-msvc": 13.4.19
"@next/swc-win32-x64-msvc": 13.4.19
"@swc/helpers": 0.5.1
busboy: 1.6.0
caniuse-lite: ^1.0.30001406
@ -10744,7 +10744,7 @@ __metadata:
optional: true
bin:
next: dist/bin/next
checksum: 49c161ffafa0f63ee07d37720431aa92dd95b1f593519d729116904b1d61e8fd2b51ed97546f9ac4406132f74198010277022948fa27cac1c82571abeba2a6cd
checksum: f4873dab8888ed4dae14d36d7cf8dc54cd042695cf7ee41d05e8757f463d11952a594eb066143cc2f7253ea1d41c6efe681cdc3ab8c2fa6eb0815fa5a94de3dc
languageName: node
linkType: hard
@ -14259,7 +14259,7 @@ __metadata:
jotai: ^2.3.1
libass-wasm: ^4.1.0
moti: ^0.26.0
next: 13.4.13
next: 13.4.19
next-translate: ^2.5.3
raf: ^3.4.1
react: 18.2.0

View File

@ -111,7 +111,7 @@ class TheMovieDatabase(Provider):
async def for_language(lng: str) -> Movie:
movie = await self.get(
f"/movie/{movie_id}",
f"movie/{movie_id}",
params={
"language": lng,
"append_to_response": "alternative_titles,videos,credits,keywords,images",
@ -186,7 +186,7 @@ class TheMovieDatabase(Provider):
async def for_language(lng: str) -> Show:
show = await self.get(
f"/tv/{show_id}",
f"tv/{show_id}",
params={
"language": lng,
"append_to_response": "alternative_titles,videos,credits,keywords,images,external_ids",
@ -327,7 +327,7 @@ class TheMovieDatabase(Provider):
async def for_language(lng: str) -> Episode:
episode = await self.get(
f"/tv/{show_id}/season/{season}/episode/{episode_nbr}",
f"tv/{show_id}/season/{season}/episode/{episode_nbr}",
params={
"language": lng,
},