choreL fix app build errors

This commit is contained in:
Lars Hampe 2024-10-24 21:28:33 +02:00
parent 244ffb6d03
commit e4c6cd02ac
11 changed files with 9 additions and 36 deletions

View File

@ -1,5 +1,3 @@
import { FileStackIcon, NotebookTextIcon } from 'lucide-react'
import {
Sidebar as SidebarComp,
SidebarContent,
@ -11,7 +9,6 @@ import {
SidebarMenuItem,
} from '@boring.tools/ui'
import { Link } from '@tanstack/react-router'
import { useChangelogList } from '../hooks/useChangelog'
import { SidebarChangelog } from './SidebarChangelog'
import { SidebarPage } from './SidebarPage'
import { SidebarUser } from './SidebarUser'

View File

@ -10,12 +10,7 @@ import {
SidebarMenuSubItem,
} from '@boring.tools/ui'
import { Link } from '@tanstack/react-router'
import {
ChevronRightIcon,
FileStackIcon,
PlusCircleIcon,
PlusIcon,
} from 'lucide-react'
import { ChevronRightIcon, FileStackIcon, PlusIcon } from 'lucide-react'
import { useChangelogList } from '../hooks/useChangelog'
export const SidebarChangelog = () => {

View File

@ -39,7 +39,7 @@ export const SidebarPage = () => {
<SidebarMenuSubItem key={page.id}>
<SidebarMenuSubButton asChild>
<Link
to={`/page/${page.id}`}
to={`/page/${page?.id}`}
activeProps={{
className: 'bg-sidebar-primary',
}}

View File

@ -20,7 +20,7 @@ export const usePageList = () => {
const { getToken } = useAuth()
return useQuery({
queryKey: ['pageList'],
queryFn: async (): Promise<ReadonlyArray<PageList>> =>
queryFn: async (): Promise<Readonly<PageList>> =>
await queryFetch({
path: 'page',
method: 'get',

View File

@ -7,8 +7,6 @@ import {
} from '@boring.tools/ui'
import { Link, createLazyFileRoute } from '@tanstack/react-router'
import { PlusCircleIcon } from 'lucide-react'
import { VersionStatus } from '../components/Changelog/VersionStatus'
import { useChangelogById } from '../hooks/useChangelog'
import { usePageById } from '../hooks/usePage'
const Component = () => {

View File

@ -8,13 +8,11 @@ import { Link, Outlet, createLazyFileRoute } from '@tanstack/react-router'
import { FileStackIcon, PencilIcon } from 'lucide-react'
import { PageDelete } from '../components/Page/Delete'
import { PageWrapper } from '../components/PageWrapper'
import { useChangelogById } from '../hooks/useChangelog'
import { usePageById } from '../hooks/usePage'
const Component = () => {
const { id } = Route.useParams()
const { data, error, isPending, refetch } = usePageById({ id })
console.log(data)
if (error) {
return (
<div className="flex items-center justify-center mt-32 flex-col">

View File

@ -1,4 +1,4 @@
import { ChangelogCreateInput, PageCreateInput } from '@boring.tools/schema'
import { PageCreateInput } from '@boring.tools/schema'
import {
Button,
Command,
@ -28,19 +28,9 @@ import { Check, ChevronsUpDown } from 'lucide-react'
import { useForm } from 'react-hook-form'
import type { z } from 'zod'
import { PageWrapper } from '../components/PageWrapper'
import { useChangelogCreate, useChangelogList } from '../hooks/useChangelog'
import { useChangelogList } from '../hooks/useChangelog'
import { usePageCreate } from '../hooks/usePage'
const languages = [
{ label: 'English', value: 'en' },
{ label: 'French', value: 'fr' },
{ label: 'German', value: 'de' },
{ label: 'Spanish', value: 'es' },
{ label: 'Portuguese', value: 'pt' },
{ label: 'Russian', value: 'ru' },
{ label: 'Japanese', value: 'ja' },
{ label: 'Korean', value: 'ko' },
{ label: 'Chinese', value: 'zh' },
] as const
const Component = () => {
const navigate = useNavigate({ from: '/page/create' })
const changelogList = useChangelogList()

View File

@ -1,10 +1,8 @@
import { createLazyFileRoute } from '@tanstack/react-router'
import { usePageById, usePageList } from '../hooks/usePage'
//import { usePageById, usePageList } from '../hooks/usePage'
const Component = () => {
const { data, error } = usePageList()
console.log(data)
//const { data, error } = usePageList()
return <div>some</div>
}

View File

@ -1 +1 @@
{"root":["./src/main.tsx","./src/routeTree.gen.ts","./src/vite-env.d.ts","./src/components/Layout.tsx","./src/components/Navigation.tsx","./src/components/NavigationMobile.tsx","./src/components/PageWrapper.tsx","./src/components/Sidebar.tsx","./src/components/SidebarUser.tsx","./src/components/Changelog/Delete.tsx","./src/components/Changelog/VersionDelete.tsx","./src/components/Changelog/VersionStatus.tsx","./src/hooks/useChangelog.ts","./src/routes/__root.tsx","./src/routes/changelog.$id.edit.lazy.tsx","./src/routes/changelog.$id.index.lazy.tsx","./src/routes/changelog.$id.lazy.tsx","./src/routes/changelog.$id.version.$versionId.tsx","./src/routes/changelog.$id.versionCreate.lazy.tsx","./src/routes/changelog.create.lazy.tsx","./src/routes/changelog.index.lazy.tsx","./src/routes/index.lazy.tsx","./src/routes/user/index.lazy.tsx","./src/utils/navigation-routes.ts","./src/utils/queryFetch.ts"],"version":"5.6.2"}
{"root":["./src/main.tsx","./src/routeTree.gen.ts","./src/vite-env.d.ts","./src/components/Layout.tsx","./src/components/Navigation.tsx","./src/components/NavigationMobile.tsx","./src/components/PageWrapper.tsx","./src/components/Sidebar.tsx","./src/components/SidebarChangelog.tsx","./src/components/SidebarPage.tsx","./src/components/SidebarUser.tsx","./src/components/Changelog/Delete.tsx","./src/components/Changelog/VersionDelete.tsx","./src/components/Changelog/VersionStatus.tsx","./src/components/Page/Delete.tsx","./src/hooks/useChangelog.ts","./src/hooks/usePage.ts","./src/routes/__root.tsx","./src/routes/changelog.$id.edit.lazy.tsx","./src/routes/changelog.$id.index.lazy.tsx","./src/routes/changelog.$id.lazy.tsx","./src/routes/changelog.$id.version.$versionId.tsx","./src/routes/changelog.$id.versionCreate.lazy.tsx","./src/routes/changelog.create.lazy.tsx","./src/routes/changelog.index.lazy.tsx","./src/routes/index.lazy.tsx","./src/routes/page.$id.edit.lazy.tsx","./src/routes/page.$id.index.lazy.tsx","./src/routes/page.$id.lazy.tsx","./src/routes/page.create.lazy.tsx","./src/routes/page.index.lazy.tsx","./src/routes/user/index.lazy.tsx","./src/utils/navigation-routes.ts","./src/utils/queryFetch.ts"],"version":"5.6.2"}

View File

@ -1,5 +1,4 @@
import { z } from '@hono/zod-openapi'
import { ChangelogOutput } from '../changelog'
export const PageOutput = z
.object({

View File

@ -1,6 +1,4 @@
import { z } from '@hono/zod-openapi'
import { ChangelogOutput } from '../changelog'
import { PageOutput } from './base'
export const PagePublicOutput = z.object({
title: z.string(),