Skip to content

Commit

Permalink
fix: ci failed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Nov 13, 2023
1 parent 6db5986 commit aa567e0
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 125 deletions.
6 changes: 1 addition & 5 deletions apps/expo/src/app/(app)/address/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { FormProvider, useForm } from "react-hook-form";
import { z } from "zod";





const schema = z.object({
title: z.string(),
address: z.string(),
Expand Down Expand Up @@ -67,4 +63,4 @@ export default function CreateAddressScreen() {
</FormProvider>
</View>
);
}
}
4 changes: 2 additions & 2 deletions apps/expo/src/components/forms/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function Input({ id, label, placeholder, ...props }: InputProps)
formState: { errors },
control,
} = useFormContext();
const error = get(errors, id);
const error = get(errors, id) as Error;

return (
<Controller
Expand All @@ -39,7 +39,7 @@ export default function Input({ id, label, placeholder, ...props }: InputProps)
}}
enableErrors
retainValidationSpace={false}
value={field.value}
value={field.value as string}
onChangeText={field.onChange}
onBlur={field.onBlur}
validationMessage={error?.message}
Expand Down
14 changes: 4 additions & 10 deletions apps/expo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
],
"~/*": [
"./assets/*"
]
"@/*": ["./src/*"],
"~/*": ["./assets/*"]
},
"jsx": "react-native",
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"allowJs": true,
"allowJs": true
},
"include": [
"expo-plugins",
Expand All @@ -23,7 +19,5 @@
".expo/types/**/*.ts",
"expo-env.d.ts"
],
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}
6 changes: 3 additions & 3 deletions apps/nextjs/src/components/categories/CategoryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { useToast } from "@/components/ui/use-toast";
import { insertCategorieParams } from "@/server/db/schema/categories";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import type { z } from "zod";

import { schema } from "@vivat/db";
import type { Category, NewCategoryParams } from "@vivat/db/schema/categories";

const CategoryForm = ({
Expand All @@ -34,8 +34,8 @@ const CategoryForm = ({
const router = useRouter();
const utils = api.useUtils();

const form = useForm<z.infer<typeof insertCategorieParams>>({
resolver: zodResolver(insertCategorieParams),
const form = useForm<z.infer<typeof schema.insertCategoryParams>>({
resolver: zodResolver(schema.insertCategoryParams),
defaultValues: category ?? {
name: "",
imageUrl: "",
Expand Down
52 changes: 0 additions & 52 deletions apps/nextjs/src/lib/api/categories/mutations.ts

This file was deleted.

15 changes: 0 additions & 15 deletions apps/nextjs/src/lib/api/categories/queries.ts

This file was deleted.

19 changes: 8 additions & 11 deletions apps/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": [
"./src/*"
],
"~/*": [
"./public/*"
]
"@/*": ["./src/*"],
"~/*": ["./public/*"]
},
"plugins": [
{
Expand All @@ -20,10 +16,11 @@
"target": "esnext"
},
"include": [
".",
"tsconfig.json",
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}
"exclude": ["node_modules"]
}
27 changes: 0 additions & 27 deletions packages/api/src/utils.ts

This file was deleted.

0 comments on commit aa567e0

Please sign in to comment.