From dd14efb9aee09f85ba5d4d63df394276f0467f02 Mon Sep 17 00:00:00 2001 From: William Lam Date: Sun, 20 Nov 2022 16:56:23 -0500 Subject: [PATCH] Fix analyzer weapon combobox flicker issue (#1131) * Fixed flicker with combobox issue using unstable_shouldReload(). - Reference: https://remix.run/docs/en/v1/api/conventions#never-reloading-the-root * Update app/routes/analyzer.tsx Changed to false based on Sendou's recommendation Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com> Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com> --- app/routes/analyzer.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx index 3cb33c012..b9b0bc035 100644 --- a/app/routes/analyzer.tsx +++ b/app/routes/analyzer.tsx @@ -1,4 +1,5 @@ import { type LinksFunction, type MetaFunction } from "@remix-run/node"; +import type { ShouldReloadFunction } from "@remix-run/react"; import { Link } from "@remix-run/react"; import * as React from "react"; import { useTranslation } from "~/hooks/useTranslation"; @@ -65,6 +66,9 @@ export const handle: SendouRouteHandle = { navItemName: "analyzer", }; +// Resolves this Github issue: https://github.com/Sendouc/sendou.ink/issues/1053 +export const unstable_shouldReload: ShouldReloadFunction = () => false; + export default function BuildAnalyzerPage() { const { t } = useTranslation(["analyzer", "common", "weapons"]); useSetTitle(t("common:pages.analyzer"));