-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
573 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,39 @@ | ||
import { ReactNode } from 'react' | ||
|
||
import { DatasetsRepository } from '@latitude-data/core/repositories' | ||
import { Container, TableWithHeader, Text } from '@latitude-data/web-ui' | ||
import { Container, TableWithHeader } from '@latitude-data/web-ui' | ||
import { AppTabs } from '$/app/(private)/AppTabs' | ||
import { DatasetsTable } from '$/app/(private)/datasets/_components/DatasetsTable' | ||
import { AppLayout } from '$/components/layouts' | ||
import { getCurrentUser } from '$/services/auth/getCurrentUser' | ||
import { ROUTES } from '$/services/routes' | ||
import Link from 'next/link' | ||
|
||
import { NAV_LINKS } from '../_lib/constants' | ||
|
||
export default async function DatasetsList({ | ||
children, | ||
}: Readonly<{ | ||
children: ReactNode | ||
}>) { | ||
const { workspace, user } = await getCurrentUser() | ||
const { workspace } = await getCurrentUser() | ||
const scope = new DatasetsRepository(workspace.id) | ||
const datasets = await scope.findAll().then((r) => r.unwrap()) | ||
return ( | ||
<AppLayout | ||
navigationLinks={NAV_LINKS} | ||
currentUser={user} | ||
breadcrumbs={[ | ||
{ | ||
name: workspace.name, | ||
}, | ||
{ | ||
name: <Text.H5M>Datasets</Text.H5M>, | ||
}, | ||
]} | ||
> | ||
<Container> | ||
<AppTabs /> | ||
{children} | ||
<TableWithHeader | ||
title='Datasets' | ||
actions={ | ||
<div className='flex flex-row items-center gap-2'> | ||
<Link href={ROUTES.datasets.generate.root}> | ||
<TableWithHeader.Button> | ||
Generate dataset | ||
</TableWithHeader.Button> | ||
</Link> | ||
<Link href={ROUTES.datasets.new.root}> | ||
<TableWithHeader.Button>Upload dataset</TableWithHeader.Button> | ||
</Link> | ||
</div> | ||
} | ||
table={<DatasetsTable datasets={datasets} />} | ||
/> | ||
</Container> | ||
</AppLayout> | ||
<Container> | ||
<AppTabs /> | ||
{children} | ||
<TableWithHeader | ||
title='Datasets' | ||
actions={ | ||
<div className='flex flex-row items-center gap-2'> | ||
<Link href={ROUTES.datasets.generate.root}> | ||
<TableWithHeader.Button>Generate dataset</TableWithHeader.Button> | ||
</Link> | ||
<Link href={ROUTES.datasets.new.root}> | ||
<TableWithHeader.Button>Upload dataset</TableWithHeader.Button> | ||
</Link> | ||
</div> | ||
} | ||
table={<DatasetsTable datasets={datasets} />} | ||
/> | ||
</Container> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
apps/web/src/app/(private)/evaluations/(evaluation)/[evaluationUuid]/dashboard/layout.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
import { ReactNode } from 'react' | ||
|
||
import { Text } from '@latitude-data/web-ui' | ||
import { getEvaluationTemplatesCached } from '$/app/(private)/_data-access' | ||
import Evaluations from '$/app/(private)/evaluations/_components/Evaluations' | ||
import { AppLayout } from '$/components/layouts' | ||
import { getCurrentUser } from '$/services/auth/getCurrentUser' | ||
|
||
import { NAV_LINKS } from '../../_lib/constants' | ||
|
||
export default async function EvaluationsLayout({ | ||
children, | ||
}: { | ||
children: ReactNode | ||
}) { | ||
const session = await getCurrentUser() | ||
const evaluationTemplates = await getEvaluationTemplatesCached() | ||
|
||
return ( | ||
<AppLayout | ||
navigationLinks={NAV_LINKS} | ||
currentUser={session.user} | ||
breadcrumbs={[ | ||
{ | ||
name: session.workspace.name, | ||
}, | ||
{ | ||
name: <Text.H5M>Evaluations</Text.H5M>, | ||
}, | ||
]} | ||
> | ||
<> | ||
<Evaluations evaluationTemplates={evaluationTemplates} /> | ||
{children} | ||
</AppLayout> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.