handle incorrect world in meta
This commit is contained in:
parent
0dcc2450a2
commit
ae45b29e93
1 changed files with 3 additions and 8 deletions
|
@ -1,13 +1,8 @@
|
||||||
import type { LoaderArgs, V2_MetaFunction } from "@remix-run/cloudflare";
|
import type { LoaderArgs, V2_MetaFunction } from "@remix-run/cloudflare";
|
||||||
import { json } from "@remix-run/cloudflare";
|
import { json } from "@remix-run/cloudflare";
|
||||||
import { useLoaderData } from "@remix-run/react";
|
import { useLoaderData } from "@remix-run/react";
|
||||||
import {
|
import type { WorldResponse, Zone } from "~/utils/saerro";
|
||||||
WorldResponse,
|
import { allClasses, allVehicles, worldQuery } from "~/utils/saerro";
|
||||||
Zone,
|
|
||||||
allClasses,
|
|
||||||
allVehicles,
|
|
||||||
worldQuery,
|
|
||||||
} from "~/utils/saerro";
|
|
||||||
import { pascalCaseToTitleCase, toTitleCase } from "~/utils/strings";
|
import { pascalCaseToTitleCase, toTitleCase } from "~/utils/strings";
|
||||||
|
|
||||||
export const loader = async ({ params }: LoaderArgs) => {
|
export const loader = async ({ params }: LoaderArgs) => {
|
||||||
|
@ -15,7 +10,7 @@ export const loader = async ({ params }: LoaderArgs) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const meta: V2_MetaFunction<typeof loader> = ({ data }) => {
|
export const meta: V2_MetaFunction<typeof loader> = ({ data }) => {
|
||||||
return [{ title: `${data.world.name} | PS2.LIVE` }];
|
return [{ title: `${data?.world.name || "Unknown world"} | PS2.LIVE` }];
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function World() {
|
export default function World() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue