Improve MineGeo exploration and mapping features
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import { Header, Footer } from "@/components/Shell";
|
||||
import { DraftEditor } from "@/components/DraftEditor";
|
||||
import { user } from "@/lib/supabase";
|
||||
import { redirect } from "next/navigation";
|
||||
export default async function Draft({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params;
|
||||
if (!(await user()))
|
||||
redirect(`/log-in?next=${encodeURIComponent("/dashboard/" + id)}`);
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<main className="section page-content">
|
||||
<span className="eyebrow">YOUR WORLD, BEFORE THE WORLD SEES IT</span>
|
||||
<h1>At the drawing board.</h1>
|
||||
<DraftEditor id={(await params).id} />
|
||||
<DraftEditor id={id} />
|
||||
</main>
|
||||
<Footer />
|
||||
</>
|
||||
|
||||
@@ -3,9 +3,11 @@ import { SignIn } from "@/components/SignIn";
|
||||
import { Dashboard } from "@/components/Dashboard";
|
||||
import { admin, user, required } from "@/lib/supabase";
|
||||
import Link from "next/link";
|
||||
import { accountProfile } from "@/lib/profile";
|
||||
export const dynamic = "force-dynamic";
|
||||
export default async function DashboardPage() {
|
||||
const account = await user();
|
||||
const profile = account ? await accountProfile(account) : null;
|
||||
const history = account
|
||||
? required(
|
||||
await admin()
|
||||
@@ -24,6 +26,7 @@ export default async function DashboardPage() {
|
||||
<>
|
||||
<span className="eyebrow">THE CARTOGRAPHER’S DESK</span>
|
||||
<h1>My expedition.</h1>
|
||||
<p className="lead">Welcome back, {profile?.display_name}.</p>
|
||||
<Dashboard />
|
||||
{history.length > 0 && (
|
||||
<section className="token-box">
|
||||
|
||||
Reference in New Issue
Block a user