Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgutgon committed Sep 5, 2024
1 parent 80d05bb commit a424f33
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/actions/datasets/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export const createDatasetAction = authProcedure
name: input.name,
file: input.dataset_file,
},
}).then(r => r.unwrap())
}).then((r) => r.unwrap())
})
42 changes: 19 additions & 23 deletions apps/web/src/app/(private)/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,29 @@ export default async function DashboardLayout({
>
<Container>
{children}
<div className='flex-1'>
<ListingHeader
title='Projects'
actions={
<ListingHeader
title='Projects'
actions={
<Link href={ROUTES.dashboard.projects.new.root}>
<ListingHeader.Button>Add project</ListingHeader.Button>
</Link>
}
/>
{projects.length > 0 && (
<ProjectsTable documents={documents} projects={projects} />
)}
{projects.length === 0 && (
<TableBlankSlate
description='There are no projects yet. Create one to start adding your prompts.'
link={
<Link href={ROUTES.dashboard.projects.new.root}>
<ListingHeader.Button>Add project</ListingHeader.Button>
<TableBlankSlate.Button>
Create your first project
</TableBlankSlate.Button>
</Link>
}
/>
<div className='flex flex-col gap-2'>
{projects.length > 0 && (
<ProjectsTable documents={documents} projects={projects} />
)}
{projects.length === 0 && (
<TableBlankSlate
description='There are no projects yet. Create one to start adding your prompts.'
link={
<Link href={ROUTES.dashboard.projects.new.root}>
<TableBlankSlate.Button>
Create your first project
</TableBlankSlate.Button>
</Link>
}
/>
)}
</div>
</div>
)}
</Container>
</AppLayout>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export function DatasetsTable({
<Text.H4>{dataset.fileMetadata.headers.length}</Text.H4>
</TableCell>
<TableCell align='center'>
<Button variant='nope' iconProps={{ name: 'trash', color: 'destructive' }} />
<Button
variant='nope'
iconProps={{ name: 'trash', color: 'destructive' }}
/>
</TableCell>
</TableRow>
))}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/disk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class DiskWrapper {
this.disk = new Disk(this.buildDisk(args))
}

file (key: string) {
file(key: string) {
return this.disk.file(key)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/services/datasets/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const createDataset = async (
...fileMetadata,
headers,
rowCount,
}
},
})
.returning()

Expand Down
5 changes: 4 additions & 1 deletion packages/web-ui/src/ds/atoms/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ const TableCell = forwardRef<HTMLTableCellElement, CellProps>(
({ className, children, align = 'left', ...props }, ref) => (
<td
ref={ref}
className={cn('px-4 align-middle [&:has([role=checkbox])]:pr-0', className)}
className={cn(
'px-4 align-middle [&:has([role=checkbox])]:pr-0',
className,
)}
{...props}
>
<div
Expand Down

0 comments on commit a424f33

Please sign in to comment.