show project cards in grid
This commit is contained in:
@@ -45,12 +45,14 @@ export default async function Page({
|
|||||||
<FullWidthNavbar>
|
<FullWidthNavbar>
|
||||||
<SignOutButton />
|
<SignOutButton />
|
||||||
</FullWidthNavbar>
|
</FullWidthNavbar>
|
||||||
<div className="mx-auto flex w-full max-w-xl flex-col gap-4 p-4 pt-20 ">
|
<div className="mx-auto flex flex-col gap-4 p-4 pt-20 md:max-w-[95vw] lg:max-w-[80vw] ">
|
||||||
<h1 className="text-xl font-medium">Select project</h1>
|
<h1 className="text-xl font-medium">Select project</h1>
|
||||||
|
<div className="grid gap-4 md:grid-cols-2">
|
||||||
{projects.map((item) => (
|
{projects.map((item) => (
|
||||||
<ProjectCard key={item.id} {...item} />
|
<ProjectCard key={item.id} {...item} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import withSuspense from '@/hocs/with-suspense';
|
|
||||||
import { shortNumber } from '@/hooks/useNumerFormatter';
|
import { shortNumber } from '@/hooks/useNumerFormatter';
|
||||||
import { Fallback } from '@radix-ui/react-avatar';
|
|
||||||
import { endOfMonth, startOfMonth } from 'date-fns';
|
|
||||||
import { escape } from 'sqlstring';
|
import { escape } from 'sqlstring';
|
||||||
|
|
||||||
import type { IServiceProject } from '@openpanel/db';
|
import type { IServiceProject } from '@openpanel/db';
|
||||||
@@ -26,9 +23,7 @@ function ProjectCard({ id, name, organizationSlug }: IServiceProject) {
|
|||||||
<ProjectChart id={id} />
|
<ProjectChart id={id} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between gap-4 text-sm text-muted-foreground">
|
<div className="flex justify-end gap-4 text-sm text-muted-foreground">
|
||||||
<div className="font-medium">Visitors</div>
|
|
||||||
|
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<ProjectMetrics id={id} />
|
<ProjectMetrics id={id} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|||||||
Reference in New Issue
Block a user