-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
188f382
commit 405b211
Showing
13 changed files
with
112 additions
and
80 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
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
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,15 +1,15 @@ | ||
import { Button } from '@/components/ui/button' | ||
import { PlusIcon } from '@radix-ui/react-icons' | ||
import Link from 'next/link' | ||
import { PropsWithChildren } from 'react' | ||
|
||
interface AddLensButtonProps {} | ||
export interface AddLensButton { | ||
teamSlug: string | ||
} | ||
|
||
export function AddLensButton({}: AddLensButtonProps) { | ||
export function AddLensButton({ teamSlug }: PropsWithChildren<AddLensButton>) { | ||
return ( | ||
<Link href="/dashboard/lenses/new" passHref> | ||
<Button variant={'outline'}> | ||
<PlusIcon /> | ||
</Button> | ||
<Link href={`/teams/${teamSlug}/lenses/new`} passHref> | ||
<Button variant={'outline'}>Add Lens</Button> | ||
</Link> | ||
) | ||
} |
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
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
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,16 +1,21 @@ | ||
import { z } from 'zod' | ||
import { FindOneTeamByNameSlug } from './teams' | ||
import { PaginationSchema } from './pagination' | ||
import { ScopeSchema } from './scope' | ||
|
||
export const LensesGetSchema = z.string().uuid() | ||
export const LensesDeleteSchema = z.string().uuid() | ||
export const LensesPublishSchema = z.string().uuid() | ||
export const LensesGetQuestionSchema = z.string() | ||
export const LensesAddSchema = z.object({ | ||
name: z.string().min(1).max(256), | ||
description: z.string().min(10).max(2048), | ||
spec: z.string() | ||
}) | ||
|
||
export const LensesAddSchema = z | ||
.object({ | ||
name: z.string().min(1).max(256), | ||
description: z.string().min(10).max(2048), | ||
spec: z.string() | ||
}) | ||
.and(ScopeSchema) | ||
export type CreateLens = z.infer<typeof LensesAddSchema> | ||
|
||
export const ListLensByTeamSlug = FindOneTeamByNameSlug.and(PaginationSchema) | ||
export type ListLensByTeamSlug = z.infer<typeof ListLensByTeamSlug> |
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