Harden gameplay timing and map loading
This commit is contained in:
@@ -10,12 +10,8 @@ export default async function ServerPage({
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params;
|
||||
let map;
|
||||
try {
|
||||
map = await getMap(id);
|
||||
} catch {
|
||||
notFound();
|
||||
}
|
||||
const map = await getMap(id);
|
||||
if (!map) notFound();
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
@@ -34,7 +30,7 @@ export default async function ServerPage({
|
||||
<div>
|
||||
<div className="detail-map">
|
||||
<Image
|
||||
src={map.mapImage || map.image || ""}
|
||||
src={map.mapImage || map.image || "/images/example-map.webp"}
|
||||
alt={`${map.name} surface map`}
|
||||
width={1024}
|
||||
height={1024}
|
||||
|
||||
Reference in New Issue
Block a user