Add map import and export with durable refresh progress
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { getI18n } from "@/lib/i18n";
|
||||
import { Header, Footer, EmptyState } from "@/components/Shell";
|
||||
import { Header, Footer } from "@/components/Shell";
|
||||
import { catalog } from "@/lib/catalog";
|
||||
import { CatalogBrowser } from "@/components/CatalogBrowser";
|
||||
import { user } from "@/lib/supabase";
|
||||
export const dynamic = "force-dynamic";
|
||||
export default async function Servers() {
|
||||
const { t } = await getI18n();
|
||||
const maps = await catalog();
|
||||
const [maps, account] = await Promise.all([catalog(), user()]);
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
@@ -19,15 +20,7 @@ export default async function Servers() {
|
||||
"From familiar spawn towns to places nobody’s quite sure about. Pick your next expedition.",
|
||||
)}
|
||||
</p>
|
||||
{maps.length ? (
|
||||
<CatalogBrowser maps={maps} />
|
||||
) : (
|
||||
<EmptyState title={t("Fresh chunks, fresh start")}>
|
||||
{t(
|
||||
"No maps have been approved yet. Your server could be the first.",
|
||||
)}
|
||||
</EmptyState>
|
||||
)}
|
||||
<CatalogBrowser maps={maps} signedIn={!!account} />
|
||||
</main>
|
||||
<Footer />
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user