Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .release-it.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module.exports = {
hooks: {
"before:init": "nr test run",
"before:init": ["nr test run", "which git-cliff"],
"before:beforeBump": [
"git flow release start v${version}",
"echo \uD83D\uDC4A before:bump version=v${version} latestVersion=v${latestVersion}"
],
"after:bump": [
"pnpx auto-changelog -p && git add CHANGELOG.md",
"git cliff -o CHANGELOG.md && git add CHANGELOG.md",
'git commit --allow-empty -am "ci: update CHANGELOG"',
"echo \uD83D\uDC4A after:bump version=v${version} latestVersion=v${latestVersion}"
],
"after:release": [
Expand Down
4 changes: 2 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"files": {
"ignore": [".next", "./**/*config.js", "./**/*.d.ts"],
"ignoreUnknown": true
Expand Down Expand Up @@ -29,7 +29,7 @@
"formatter": {
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"trailingComma": "none",
"trailingCommas": "none",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSpacing": true,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
77 changes: 40 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"version": "1.14.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev:turbo": "next dev --turbo",
"dev:old": "next dev",
"format": "biome format --write",
"dev": "next dev --turbo",
"bun:dev": "bun --bun run dev",
"build": "next build",
"start": "next start",
"lint": "next lint --format=stylish",
"lint:fix": "pnpm lint --fix",
"lint:types": "pnpm tsc",
"lint:types": "nr tsc --noEmit",
"test": "vitest",
"commitlint": "commitlint --edit",
"check": "biome check --apply ./",
Expand All @@ -33,56 +34,58 @@
"build-storybook": "storybook build"
},
"dependencies": {
"@changesets/cli": "^2.27.7",
"@changesets/cli": "^2.27.8",
"@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "^3.9.0",
"@icons-pack/react-simple-icons": "^9.7.0",
"@tanstack/react-query": "^5.53.3",
"@tanstack/react-query-devtools": "^5.54.0",
"@tanstack/react-query": "^5.56.2",
"@tanstack/react-query-devtools": "^5.58.0",
"@testing-library/jest-dom": "^6.5.0",
"chalk": "^5.3.0",
"clsx": "^2.1.1",
"next": "14.2.5",
"next": "14.2.10",
"nextjs-google-analytics": "^2.3.7",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.0",
"react-hotjar": "^6.3.1",
"react-obfuscate": "^3.7.0",
"remeda": "^2.12.0",
"tailwindcss-radix": "^3.0.4",
"remeda": "^2.14.0",
"tailwindcss-radix": "^3.0.5",
"validator": "^13.12.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@chromatic-com/storybook": "1.6.1",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@eslint/js": "^9.9.1",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@eslint/js": "^9.11.1",
"@faker-js/faker": "^8.4.1",
"@release-it/conventional-changelog": "^8.0.1",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-onboarding": "^8.2.9",
"@storybook/blocks": "^8.2.9",
"@storybook/nextjs": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/test": "^8.2.9",
"@tailwindcss/forms": "^0.5.8",
"@release-it/conventional-changelog": "^8.0.2",
"@storybook/addon-essentials": "^8.3.4",
"@storybook/addon-interactions": "^8.3.4",
"@storybook/addon-links": "^8.3.4",
"@storybook/addon-onboarding": "^8.3.4",
"@storybook/blocks": "^8.3.4",
"@storybook/nextjs": "^8.3.4",
"@storybook/react": "^8.3.4",
"@storybook/test": "^8.3.4",
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@tanstack/eslint-plugin-query": "^5.53.0",
"@tanstack/eslint-plugin-query": "^5.58.1",
"@testing-library/react": "^16.0.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.16.3",
"@types/react": "^18.3.5",
"@types/node": "^20.16.10",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"depcheck": "^1.4.7",
"dotenv-cli": "^7.4.2",
"eslint": "^9.9.1",
"eslint": "^9.11.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "14.2.5",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -93,26 +96,26 @@
"eslint-plugin-sonarjs": "^1.0.4",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-unicorn": "^55.0.0",
"execa": "^9.3.1",
"execa": "^9.4.0",
"fs-extra": "^11.2.0",
"globals": "^15.9.0",
"husky": "^9.1.5",
"husky": "^9.1.6",
"jsdom": "^24.1.3",
"lighthouse": "^12.2.0",
"lighthouse": "^12.2.1",
"oxlint": "^0.6.1",
"postcss": "^8.4.44",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"release-it": "^17.6.0",
"rimraf": "^6.0.1",
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"tsx": "^4.19.0",
"typescript": "^5.5.4",
"storybook": "^8.3.4",
"tailwindcss": "^3.4.13",
"tsx": "^4.19.1",
"typescript": "^5.6.2",
"typescript-eslint": "^7.18.0",
"unplugin-auto-import": "^0.18.2",
"unplugin-auto-import": "^0.18.3",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.0.5"
"vitest": "^2.1.1"
},
"eslintConfig": {
"extends": [
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/use-contact-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ const contactFormSchema = z.object({
// message: z.string().min(1, { message: "Message is Required" })
// age: z.number().min(10),
});
export type contactFormFields = z.infer<typeof contactFormSchema>; // string
export type ContactFormFields = z.infer<typeof contactFormSchema>; // string

export function useContactForm() {
const {
register,
handleSubmit,
control,
formState: { errors, isSubmitting }
} = useForm({
} = useForm<ContactFormFields>({
resolver: zodResolver(contactFormSchema)
});
return { control, register, handleSubmit, errors, isSubmitting };
return { control, register, handleSubmit, errors, isSubmitting } as const;
}
2 changes: 1 addition & 1 deletion src/ui/contact.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default meta;
type Story = StoryObj<typeof ContactForm>;
export const Default: Story = {
args: {
onSubmit: async (data: any) => {
onSubmit: async (data: unknown) => {
await delay(2000);
console.log("Form submitted with data:", data);
// You can add any logic here
Expand Down
8 changes: 4 additions & 4 deletions src/ui/contact.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { SubmitHandler } from "react-hook-form";

import { type contactFormFields, useContactForm } from "@/hooks/use-contact-form";
import { type ContactFormFields, useContactForm } from "@/hooks/use-contact-form";
import Button from "@/ui/button";
import { ErrorMessage } from "@hookform/error-message";
import { StarIcon } from "@storybook/icons";

import clsx from "clsx";

export type ContactFormProps = { onSubmit: SubmitHandler<contactFormFields> };
export type ContactFormProps = { onSubmit: SubmitHandler<ContactFormFields> };

// Street
// Suite 100
Expand Down Expand Up @@ -69,7 +69,7 @@ export function ContactForm(props: ContactFormProps) {
<ErrorMessage
key={name}
errors={errors}
name={name}
name={name as keyof ContactFormFields}
render={({ message }) => <p className={"text-red-500"}>{message}</p>}
/>
);
Expand All @@ -79,7 +79,7 @@ export function ContactForm(props: ContactFormProps) {
}

export default function ContactSection() {
const handleSubmit: SubmitHandler<contactFormFields> = async (data) => {
const handleSubmit: SubmitHandler<ContactFormFields> = async (data) => {
console.time("work");
await new Promise((r) => setTimeout(r, 2000));
console.log("Contact Form", data);
Expand Down
1 change: 1 addition & 0 deletions src/ui/sections/external-links-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export function ExternalLinksSection() {
<ul className='flex w-60 justify-between pointer-events-auto list-none'>
{Object.entries(data.links).map(([label, value]) => (
<li key={label}>
{/* @ts-ignore */}
<Obfuscate target='_blank' href={value}>
<GetIcon name={label} />
</Obfuscate>
Expand Down
Loading