Map planner to feature folder

This commit is contained in:
Kalle 2022-12-22 21:33:02 +02:00
parent 79cb4bd41d
commit f81451b0c0
9 changed files with 12 additions and 8 deletions

View File

@ -22,10 +22,9 @@ import {
stageMinimapImageUrlWithEnding,
TLDRAW_URL,
} from "~/utils/urls";
import { Button } from "./Button";
import { Image } from "./Image";
export type StageBackgroundStyle = ModeShort | "TCO";
import { Button } from "../../../components/Button";
import { Image } from "../../../components/Image";
import type { StageBackgroundStyle } from "../plans-types";
const BLUEPRINTS_AVAILABLE: Partial<Record<ModeShort, Array<StageId>>> = {
TC: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],

View File

@ -0,0 +1 @@
export type { StageBackgroundStyle } from "./plans-types";

View File

@ -0,0 +1,3 @@
import type { ModeShort } from "~/modules/in-game-lists";
export type StageBackgroundStyle = ModeShort | "TCO";

View File

@ -1,6 +1,6 @@
import { lazy } from "react";
import type { LinksFunction } from "@remix-run/node";
import styles from "~/styles/plans.css";
import styles from "./plans.css";
import type { SendouRouteHandle } from "~/utils/remix";
import { useIsMounted } from "~/hooks/useIsMounted";
import { navIconUrl, PLANNER_URL } from "~/utils/urls";
@ -18,7 +18,7 @@ export const links: LinksFunction = () => {
return [{ rel: "stylesheet", href: styles }];
};
const Planner = lazy(() => import("~/components/Planner"));
const Planner = lazy(() => import("~/features/map-planner/components/Planner"));
export default function MapPlannerPage() {
const isMounted = useIsMounted();

View File

@ -20,7 +20,7 @@ import {
specialWeaponImageUrl,
subWeaponImageUrl,
} from "~/utils/urls";
import styles from "~/styles/object-damage.css";
import styles from "../calculator.css";
import type { LinksFunction } from "@remix-run/node";
import type { SendouRouteHandle } from "~/utils/remix";
import React from "react";

View File

@ -17,7 +17,7 @@ import type {
} from "~/modules/in-game-lists/types";
import type navItems from "~/components/layout/nav-items.json";
import { type AuthErrorCode } from "~/modules/auth";
import type { StageBackgroundStyle } from "~/components/Planner";
import type { StageBackgroundStyle } from "~/features/map-planner";
export const SPLATOON_2_SENDOU_IN_URL = "https://spl2.sendou.ink";
export const PLUS_SERVER_DISCORD_URL = "https://discord.gg/FW4dKrY";

View File

@ -6,6 +6,7 @@ module.exports = {
cacheDirectory: process.env.NODE_ENV === "test" ? ".cache-test" : undefined,
routes: async (defineRoutes) => {
return defineRoutes((route) => {
route("/plans", "features/map-planner/routes/plans.tsx");
route("/analyzer", "features/build-analyzer/routes/analyzer.tsx");
route(
"/object-damage-calculator",