add more resource columns and add org list to landing page for testing

This commit is contained in:
Milo Schwartz
2024-10-19 17:01:23 -04:00
parent 57ba84eb02
commit e40328aeb7
5 changed files with 58 additions and 6 deletions

View File

@@ -40,8 +40,8 @@ export function TopbarNav({
className={cn(
"px-2 py-3 text-md",
pathname.startsWith(item.href.replace("{orgId}", orgId))
? "border-b-2 border-secondary text-secondary font-medium"
: "hover:secondary-primary text-muted-foreground font-medium",
? "border-b-2 border-primary text-primary font-medium"
: "hover:text-primary text-muted-foreground font-medium",
"whitespace-nowrap",
disabled && "cursor-not-allowed",
)}
@@ -51,9 +51,7 @@ export function TopbarNav({
>
<div className="flex items-center gap-2">
{item.icon && (
<div className="hidden md:block">
{item.icon}
</div>
<div className="hidden md:block">{item.icon}</div>
)}
{item.title}
</div>

View File

@@ -17,6 +17,8 @@ export type ResourceRow = {
id: string;
name: string;
orgId: string;
domain: string;
site: string;
};
export const columns: ColumnDef<ResourceRow>[] = [
@@ -36,6 +38,26 @@ export const columns: ColumnDef<ResourceRow>[] = [
);
},
},
{
accessorKey: "site",
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() =>
column.toggleSorting(column.getIsSorted() === "asc")
}
>
Site
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
},
},
{
accessorKey: "domain",
header: "Domain",
},
{
id: "actions",
cell: ({ row }) => {

View File

@@ -25,6 +25,8 @@ export default async function Page({ params }: ResourcesPageProps) {
id: resource.resourceId.toString(),
name: resource.name,
orgId: params.orgId,
domain: resource.subdomain || "",
site: resource.siteName || "None",
};
});