Skip to content

Commit

Permalink
feat: readme in index page
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Sep 18, 2024
1 parent 48b87fe commit f95fbbb
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions app/[lang]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { queryDashboardImages } from '@/app/actions'
import { DataTable } from '@/components/DataTable'
import { columns } from '@/components/DataTable/columns'

export const runtime = 'edge';
const mdxs = JSON.parse(process.env.mdxs ?? '');
import { md } from '@/lib/hl';

export default async function Home() {
const dashboardImages = await queryDashboardImages()
export default async function Home({
params: { lang },
}: {
params: { lang: string };
}) {
console.log(mdxs);

return <DataTable data={dashboardImages ?? []} columns={columns} />
return (
<div
dangerouslySetInnerHTML={{ __html: md.render(mdxs[lang] ?? '') }}
className="prose dark:prose-invert py-2 max-w-[980px] mx-auto"
/>
);
}

0 comments on commit f95fbbb

Please sign in to comment.