diff --git a/package-lock.json b/package-lock.json index ee2a799..c1a683c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,8 +29,6 @@ "next": "14.1.0", "next-mdx-remote": "^4.4.1", "next-themes": "^0.2.1", - "prettier-plugin-organize-imports": "^3.2.4", - "pretty-quick": "^4.0.0", "react": "^18", "react-country-flag": "^3.1.0", "react-dom": "^18", @@ -51,7 +49,9 @@ "husky": "^9.0.11", "postcss": "^8", "prettier": "^3.2.5", + "prettier-plugin-organize-imports": "^3.2.4", "prettier-plugin-tailwindcss": "^0.5.11", + "pretty-quick": "^4.0.0", "tailwindcss": "^3.3.0", "typescript": "^5" } @@ -3617,6 +3617,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -3638,7 +3639,8 @@ "node_modules/execa/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/extend": { "version": "3.0.2", @@ -3743,6 +3745,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -3896,6 +3899,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, "engines": { "node": ">=10" }, @@ -4217,6 +4221,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, "engines": { "node": ">=10.17.0" } @@ -4240,6 +4245,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, "engines": { "node": ">= 4" } @@ -4670,6 +4676,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, "engines": { "node": ">=8" }, @@ -4939,6 +4946,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -5178,7 +5186,8 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -5772,6 +5781,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, "engines": { "node": ">=6" } @@ -5979,6 +5989,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, "dependencies": { "path-key": "^3.0.0" }, @@ -6125,6 +6136,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -6156,6 +6168,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6170,6 +6183,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -6215,6 +6229,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -6458,6 +6473,7 @@ "version": "3.2.5", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -6472,6 +6488,7 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz", "integrity": "sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==", + "dev": true, "peerDependencies": { "@volar/vue-language-plugin-pug": "^1.0.4", "@volar/vue-typescript": "^1.0.4", @@ -6560,6 +6577,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.0.0.tgz", "integrity": "sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==", + "dev": true, "dependencies": { "execa": "^5.1.1", "find-up": "^5.0.0", @@ -6583,6 +6601,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", + "dev": true, "engines": { "node": ">=10" }, @@ -7445,6 +7464,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, "engines": { "node": ">=6" } @@ -7800,6 +7820,7 @@ "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8330,6 +8351,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index f23e130..c32b97b 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,6 @@ "next": "14.1.0", "next-mdx-remote": "^4.4.1", "next-themes": "^0.2.1", - "prettier-plugin-organize-imports": "^3.2.4", - "pretty-quick": "^4.0.0", "react": "^18", "react-country-flag": "^3.1.0", "react-dom": "^18", @@ -54,6 +52,8 @@ "husky": "^9.0.11", "postcss": "^8", "prettier": "^3.2.5", + "prettier-plugin-organize-imports": "^3.2.4", + "pretty-quick": "^4.0.0", "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.3.0", "typescript": "^5" diff --git a/src/components/MobileNavigation.tsx b/src/components/MobileNavigation.tsx index 4668b3f..250aff7 100644 --- a/src/components/MobileNavigation.tsx +++ b/src/components/MobileNavigation.tsx @@ -9,7 +9,8 @@ import { DrawerContent, DrawerTrigger, } from '@/components/ui/drawer' -import { Cross1Icon, HamburgerMenuIcon } from '@radix-ui/react-icons' +import { Cross1Icon } from '@radix-ui/react-icons' +import { RxHamburgerMenu } from 'react-icons/rx' export function MobileNavigation() { const [isDrawerOpen, setIsDrawerOpen] = React.useState(false) @@ -41,7 +42,7 @@ export function MobileNavigation() { variant='ghost' onClick={() => setIsDrawerOpen(true)} > - + diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx index 97f13c6..960dc30 100644 --- a/src/components/Navigation.tsx +++ b/src/components/Navigation.tsx @@ -13,6 +13,7 @@ import { navigationMenuTriggerStyle, } from '@/components/ui/navigation-menu' import { cn } from '@/lib/utils' +import { preventDefaultAction } from '@/utils' const components: { title: string; href: string; description: string }[] = [ { @@ -32,17 +33,17 @@ const components: { title: string; href: string; description: string }[] = [ export function NavigationMenuPage() { return ( - + event.preventDefault()} - onPointerLeave={(event) => event.preventDefault()} + onPointerMove={preventDefaultAction} + onPointerLeave={preventDefaultAction} > Discover event.preventDefault()} - onPointerLeave={(event) => event.preventDefault()} + onPointerMove={preventDefaultAction} + onPointerLeave={preventDefaultAction} >
    {components.map((component) => ( @@ -59,14 +60,14 @@ export function NavigationMenuPage() { event.preventDefault()} - onPointerLeave={(event) => event.preventDefault()} + onPointerMove={preventDefaultAction} + onPointerLeave={preventDefaultAction} > Recruit event.preventDefault()} - onPointerLeave={(event) => event.preventDefault()} + onPointerMove={preventDefaultAction} + onPointerLeave={preventDefaultAction} >
      diff --git a/src/utils/get-date.ts b/src/utils/get-date.ts new file mode 100644 index 0000000..fd72463 --- /dev/null +++ b/src/utils/get-date.ts @@ -0,0 +1,7 @@ +import { format, subDays } from 'date-fns' + +export const getDate = (sub: number = 0) => { + const dateXDaysAgo = subDays(new Date(), sub) + + return format(dateXDaysAgo, 'dd/MM/yyyy') +} diff --git a/src/utils/index.ts b/src/utils/index.ts index 67abe4f..2454274 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,9 +1,3 @@ -import { format, subDays } from 'date-fns' - -export const getDate = (sub: number = 0) => { - const dateXDaysAgo = subDays(new Date(), sub) - - return format(dateXDaysAgo, 'dd/MM/yyyy') -} - export * from './fetcher' +export * from './get-date' +export * from './prevent-default' diff --git a/src/utils/prevent-default.ts b/src/utils/prevent-default.ts new file mode 100644 index 0000000..8d85073 --- /dev/null +++ b/src/utils/prevent-default.ts @@ -0,0 +1,7 @@ +import React from 'react' + +export const preventDefaultAction = ( + event: T +) => { + event.preventDefault() +}