chore: fix app build errors
This commit is contained in:
parent
fb2e1eee17
commit
dbef7867ca
@ -112,13 +112,16 @@ const Component = () => {
|
|||||||
!field.value && 'text-muted-foreground',
|
!field.value && 'text-muted-foreground',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{field.value.length === 1 &&
|
{field?.value?.length === 1 &&
|
||||||
changelogList.data?.find((changelog) =>
|
changelogList.data?.find((changelog) =>
|
||||||
field.value?.includes(changelog.id),
|
field.value?.includes(changelog.id),
|
||||||
)?.title}
|
)?.title}
|
||||||
{field.value.length <= 0 && 'No changelog selected'}
|
{field?.value &&
|
||||||
{field.value.length > 1 &&
|
field.value.length <= 0 &&
|
||||||
`${field.value.length} selected`}
|
'No changelog selected'}
|
||||||
|
{field?.value &&
|
||||||
|
field.value.length > 1 &&
|
||||||
|
`${field?.value?.length} selected`}
|
||||||
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
||||||
</Button>
|
</Button>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@ -135,14 +138,16 @@ const Component = () => {
|
|||||||
key={changelog.id}
|
key={changelog.id}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
const getIds = () => {
|
const getIds = () => {
|
||||||
if (field.value.includes(changelog.id)) {
|
if (field.value?.includes(changelog.id)) {
|
||||||
const asd = field.value.filter(
|
return field.value.filter(
|
||||||
(id) => id !== changelog.id,
|
(id) => id !== changelog.id,
|
||||||
)
|
)
|
||||||
return asd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [...field.value, changelog.id]
|
return [
|
||||||
|
...(field?.value as string[]),
|
||||||
|
changelog.id,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
form.setValue('changelogIds', getIds())
|
form.setValue('changelogIds', getIds())
|
||||||
}}
|
}}
|
||||||
@ -150,7 +155,7 @@ const Component = () => {
|
|||||||
<Check
|
<Check
|
||||||
className={cn(
|
className={cn(
|
||||||
'mr-2 h-4 w-4',
|
'mr-2 h-4 w-4',
|
||||||
field.value.includes(changelog.id)
|
field.value?.includes(changelog.id)
|
||||||
? 'opacity-100'
|
? 'opacity-100'
|
||||||
: 'opacity-0',
|
: 'opacity-0',
|
||||||
)}
|
)}
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
CardTitle,
|
CardTitle,
|
||||||
} from '@boring.tools/ui'
|
} from '@boring.tools/ui'
|
||||||
import { Link, createLazyFileRoute } from '@tanstack/react-router'
|
import { Link, createLazyFileRoute } from '@tanstack/react-router'
|
||||||
import { CircleMinusIcon, PlusCircleIcon } from 'lucide-react'
|
import { CircleMinusIcon } from 'lucide-react'
|
||||||
import { usePageById, usePageUpdate } from '../hooks/usePage'
|
import { usePageById, usePageUpdate } from '../hooks/usePage'
|
||||||
|
|
||||||
const Component = () => {
|
const Component = () => {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { z } from '@hono/zod-openapi'
|
import { z } from '@hono/zod-openapi'
|
||||||
import { PageOutput } from './base'
|
import { PageOutput } from './base'
|
||||||
import { PageCreateInput } from './create'
|
|
||||||
|
|
||||||
export const PageUpdateOutput = PageOutput
|
export const PageUpdateOutput = PageOutput
|
||||||
export const PageUpdateInput = z
|
export const PageUpdateInput = z
|
||||||
|
Loading…
Reference in New Issue
Block a user