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>
This commit is contained in:
William Lam
2022-11-20 16:56:23 -05:00
committed by GitHub
parent b69302c095
commit dd14efb9ae

View File

@@ -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"));