Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes (attempt 2/3)
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Sep 20, 2024
1 parent 685cbd6 commit 70f78bd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function NavBar({ className }: { className?: string }) {
Beta
</Badge>
</SidebarButton>

<SidebarButton href="/settings/providers/notion">Notion</SidebarButton>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ import {
FormField,
FormItem,
FormLabel,
FormMessage,

FormMessage
} from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import {
Select,
SelectTrigger,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue
} from '@/components/ui/select'
import { Input } from '@/components/ui/input'

const createNotionDocumentMutation = graphql(/* GraphQL */ `
mutation CreateNotionDocument($input: CreateNotionDocumentInput!) {
Expand All @@ -41,8 +40,8 @@ const createNotionDocumentMutation = graphql(/* GraphQL */ `
const formSchema = z.object({
accessToken: z.string().trim(),
integrationId: z.string().trim(),
integrationType: z.nativeEnum(NotionDocumentType),
name: z.string().trim(),
integrationType: z.nativeEnum(NotionDocumentType),
name: z.string().trim()
})

type FormValues = z.infer<typeof formSchema>
Expand All @@ -60,7 +59,7 @@ export default function CreateNotionDocument() {
const { isSubmitting } = form.formState
const createNotionDocument = useMutation(createNotionDocumentMutation, {
onCompleted() {
form.reset({ name: undefined, })
form.reset({ name: undefined })
onCreated()
},
form
Expand Down Expand Up @@ -108,15 +107,14 @@ export default function CreateNotionDocument() {
<FormLabel required>Access Token</FormLabel>
<FormControl>
<Input
placeholder='e.g. secret_******'
placeholder="e.g. secret_******"
autoCapitalize="none"
autoCorrect="off"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>

)}
/>
<FormField
Expand All @@ -126,12 +124,7 @@ export default function CreateNotionDocument() {
<FormItem>
<FormLabel required>Integration ID</FormLabel>
<FormControl>
<Input

autoCapitalize="none"
autoCorrect="off"
{...field}
/>
<Input autoCapitalize="none" autoCorrect="off" {...field} />
</FormControl>
<FormMessage />
</FormItem>
Expand All @@ -142,25 +135,21 @@ export default function CreateNotionDocument() {
name="integrationType"
render={({ field }) => (
<FormItem>
<FormLabel required>Integration Type</FormLabel>
<Select
onValueChange={field.onChange}
>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Notion Integration Type" />
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value={NotionDocumentType.Database}>DATABASE</SelectItem>
</SelectContent>
</Select>
<FormMessage />
</FormItem>




<FormLabel required>Integration Type</FormLabel>
<Select onValueChange={field.onChange}>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Notion Integration Type" />
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value={NotionDocumentType.Database}>
DATABASE
</SelectItem>
</SelectContent>
</Select>
<FormMessage />
</FormItem>
)}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { Button, buttonVariants } from '@/components/ui/button'
import {
IconClose,
IconListFilter,
IconPlus,
IconSearch,
IconTrash
} from '@/components/ui/icons'
Expand Down Expand Up @@ -91,7 +90,7 @@ const deleteNotionDocumentMutation = graphql(/* GraphQL */ `
`)

type ListItem = ArrayElementType<
NotionDocumentsQuery['notionDocuments']['edges']
NotionDocumentsQuery['notionDocuments']['edges']
>

export default function NotionDocument() {
Expand Down Expand Up @@ -299,7 +298,7 @@ export default function NotionDocument() {
<TableCell className="break-all lg:break-words">
<p>{x.node.name}</p>
<p className="text-xs text-muted-foreground">
{x.node.integrationType}: {x.node.integrationId}
{x.node.integrationType}: {x.node.integrationId}
</p>
</TableCell>
{/* <TableCell>
Expand All @@ -312,7 +311,7 @@ export default function NotionDocument() {
{x.node.integrationId}
</p>
</TableCell> */}

<TableCell>
<JobInfoView
jobInfo={x.node.jobInfo}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ import NotionDocument from './components/notion-doc'
export default function DocumentProviderPage() {
return (
<>

<CardContent className="pl-0 pt-8 xl:pb-32">
<SubHeader>
<p>
Notion Database Integration
</p>
<p>Notion Database Integration</p>
</SubHeader>
<NotionDocument />
</CardContent>
Expand Down

0 comments on commit 70f78bd

Please sign in to comment.