diff --git a/TODO.md b/TODO.md index 3ea3f79..2eed767 100644 --- a/TODO.md +++ b/TODO.md @@ -6,15 +6,18 @@ > https://next-s3-upload.codingvalue.com/setup > API changes - +- [] purpose of passing location details in the listing create api? - [] add a new field `hash` to image entity and have max length of 100(even though actually needed is less than 25) - [] always sort images to make the preview image as the first image (specially in the detail screen) - [] vehicle description needs to be at least 1000 characters? // new! - [] make postal code into alpha numeric (need to be able to save 00500 as a postal code) - [] make trim as optional -- [] only return name for city api call, only return name and state code for state api call, remove id from country list & detail api call - +- [] only return name for city api call, only return name and state code for state api call, remove id from country list & detail api call +- [] is lease field really necessary? +- [] vehicle brands have duplicate values +- [] return empty array instead of 404 if no cities or states found +- [] state city sql query should also use like instead of == > Web app todo list @@ -31,9 +34,13 @@ - [] add country code as inputPrefix for phone numbers - [] show currency as inputPrefix for price inputs - [] avoid session?.user?.sub! -- [] if city list is empty, use the selected state name as city - [] verify how emtpy, unauthorized and error component redirects & links work - [] refer create t3 structure and eslint +- [] add watermark to uploaded image +- [] frequently going fowrard and backward in search screen triggers loading bug +- [] having debouncer in search inputs in search screen causes issues when page load during typing +- [] show expiry date in listings throughout. specially when renewing listings +- [] handle when visting posted listing from different country > Need to verify - [] loading bug when changing query (while loading type something) (Added a possible fix) @@ -51,3 +58,14 @@ > SEO Todo list - [] https://webmasters.stackexchange.com/questions/104987/how-to-change-which-image-from-website-is-shown-in-google-search-result + + +> Update next 14 +- https://nextjs.org/blog/next-14 +- https://nextjs.org/blog/security-nextjs-server-components-actions +- https://www.google.com/search?q=useOptimistic+nextjs&sca_esv=577069831&sxsrf=AM9HkKl0JJWRR2DdtSSLbVHT4AmJA5u_aw%3A1698382865056&ei=EUQ7ZbyLA_XCkPIPyYSlwAI&ved=0ahUKEwj81_SauZWCAxV1IUQIHUlCCSgQ4dUDCBA&uact=5&oq=useOptimistic+nextjs&gs_lp=Egxnd3Mtd2l6LXNlcnAiFHVzZU9wdGltaXN0aWMgbmV4dGpzMgUQABiABDIIEAAYFhgeGAoyCBAAGBYYHhgKSMgNUMACWL8McAF4AZABAJgB7AKgAeQNqgEDMy01uAEDyAEA-AEBwgIKEAAYRxjWBBiwA8ICChAAGIoFGLADGEPCAgcQABiABBgKwgIGEAAYHhgKwgIIEAAYBRgeGAriAwQYACBBiAYBkAYK&sclient=gws-wiz-serp +- https://www.google.com/search?q=useformstate+nextjs&sca_esv=577069831&sxsrf=AM9HkKlXzXTdtiS0i24ryrvOEp6sfjRWpw%3A1698382869133&ei=FUQ7ZcvkB9_AkPIP6__W6Qo&oq=useFormState+ne&gs_lp=Egxnd3Mtd2l6LXNlcnAiD3VzZUZvcm1TdGF0ZSBuZSoCCAAyBRAAGIAESOczUOoEWJEHcAF4AZABAJgB6gKgAakIqgEDMy0zuAEDyAEA-AEBwgIKEAAYRxjWBBiwA8ICChAAGIoFGLADGEPCAgoQABiABBgUGIcCwgIHEAAYigUYQ8ICBhAAGBYYHuIDBBgAIEGIBgGQBgk&sclient=gws-wiz-serp +- https://www.google.com/search?q=useFormStatus+nextjs&sca_esv=577069831&sxsrf=AM9HkKkgd25RRusBkihkQcRbdAx9pu63Sw%3A1698382873110&ei=GUQ7ZbWwBpfvkPIP8q6OyAk&ved=0ahUKEwj1oOCeuZWCAxWXN0QIHXKXA5kQ4dUDCBA&uact=5&oq=useFormStatus+nextjs&gs_lp=Egxnd3Mtd2l6LXNlcnAiFHVzZUZvcm1TdGF0dXMgbmV4dGpzMgcQABiABBgKMggQABgWGB4YCkjAFlC0AVjHC3ABeAGQAQCYAYUDoAH6E6oBAzMtN7gBA8gBAPgBAcICChAAGEcY1gQYsAPCAgoQABiKBRiwAxhDwgIFEAAYgATiAwQYACBBiAYBkAYJ&sclient=gws-wiz-serp +- https://nextjs.org/docs/app/api-reference/functions/generate-viewport +- https://nextjs.org/docs/app/api-reference/functions/unstable_cache + diff --git a/next.config.mjs b/next.config.mjs index c13fbea..b203b3d 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -7,13 +7,9 @@ await import("./src/env.mjs"); /** @type {import("next").NextConfig} */ const config = { reactStrictMode: true, - swcMinify: true, images: { formats: ["image/avif", "image/webp"], domains: ["ik.imagekit.io"], }, - experimental: { - serverActions: true, - }, }; export default config; diff --git a/package.json b/package.json index dd61812..f6e7b65 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "fslightbox-react": "^1.7.6", "lodash.debounce": "^4.0.8", "nanoid": "^5.0.1", - "next": "13.5.6", + "next": "14.0.0", "postcss": "8.4.23", "prop-types": "^15.8.1", "query-string": "^8.1.0", @@ -53,12 +53,12 @@ "devDependencies": { "@types/fslightbox-react": "^1.7.4", "@types/lodash.debounce": "^4.0.7", - "@types/react": "^18.2.14", + "@types/react": "^18.2.33", "@types/react-datepicker": "^4.15.0", - "@types/react-dom": "^18.2.6", + "@types/react-dom": "^18.2.14", "@typescript-eslint/parser": "^6.7.3", "eslint": "8.50.0", - "eslint-config-next": "13.5.4", + "eslint-config-next": "14.0.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.28.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ecbf0bb..86d36c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,9 +12,9 @@ specifiers: '@types/fslightbox-react': ^1.7.4 '@types/lodash.debounce': ^4.0.7 '@types/node': 20.1.3 - '@types/react': ^18.2.14 + '@types/react': ^18.2.33 '@types/react-datepicker': ^4.15.0 - '@types/react-dom': ^18.2.6 + '@types/react-dom': ^18.2.14 '@typescript-eslint/parser': ^6.7.3 autoprefixer: 10.4.14 browser-image-compression: ^2.0.2 @@ -25,7 +25,7 @@ specifiers: embla-carousel-autoplay: 8.0.0-rc14 embla-carousel-react: 8.0.0-rc14 eslint: 8.50.0 - eslint-config-next: 13.5.4 + eslint-config-next: 14.0.0 eslint-config-prettier: ^9.0.0 eslint-import-resolver-typescript: ^3.6.1 eslint-plugin-import: ^2.28.1 @@ -36,7 +36,7 @@ specifiers: fslightbox-react: ^1.7.6 lodash.debounce: ^4.0.8 nanoid: ^5.0.1 - next: 13.5.6 + next: 14.0.0 postcss: 8.4.23 prettier: ^3.0.3 prop-types: ^15.8.1 @@ -55,7 +55,7 @@ specifiers: zod: ^3.21.4 dependencies: - '@auth0/nextjs-auth0': 3.1.0_next@13.5.6 + '@auth0/nextjs-auth0': 3.1.0_next@14.0.0 '@aws-sdk/client-s3': 3.421.0 '@aws-sdk/s3-request-presigner': 3.421.0 '@formkit/auto-animate': 0.8.0 @@ -76,7 +76,7 @@ dependencies: fslightbox-react: 1.7.6_v2m5e27vhdewzwhryxwfaorcca lodash.debounce: 4.0.8 nanoid: 5.0.1 - next: 13.5.6_biqbaboplfbrettd7655fr4n2y + next: 14.0.0_biqbaboplfbrettd7655fr4n2y postcss: 8.4.23 prop-types: 15.8.1 query-string: 8.1.0 @@ -96,12 +96,12 @@ dependencies: devDependencies: '@types/fslightbox-react': 1.7.4 '@types/lodash.debounce': 4.0.7 - '@types/react': 18.2.14 + '@types/react': 18.2.33 '@types/react-datepicker': 4.15.0_biqbaboplfbrettd7655fr4n2y - '@types/react-dom': 18.2.6 + '@types/react-dom': 18.2.14 '@typescript-eslint/parser': 6.7.3_jk7qbkaijtltyu4ajmze3dfiwa eslint: 8.50.0 - eslint-config-next: 13.5.4_jk7qbkaijtltyu4ajmze3dfiwa + eslint-config-next: 14.0.0_jk7qbkaijtltyu4ajmze3dfiwa eslint-config-prettier: 9.0.0_eslint@8.50.0 eslint-import-resolver-typescript: 3.6.1_3j3omiadvlpv5rpfrjr5lycjfu eslint-plugin-import: 2.28.1_7juwwq4lilwvkas6knc4dqepxq @@ -121,7 +121,7 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} - /@auth0/nextjs-auth0/3.1.0_next@13.5.6: + /@auth0/nextjs-auth0/3.1.0_next@14.0.0: resolution: {integrity: sha512-K00wD7hlMRcmDgDVRN5pP/SLV7odBnvAXvput1kJHGRJUp9FwFzg6BEGEWVHhr2YOXcn+VdVMMjXlmWYV+aZ1A==} engines: {node: '>=16'} peerDependencies: @@ -132,7 +132,7 @@ packages: debug: 4.3.4 joi: 17.10.2 jose: 4.14.4 - next: 13.5.6_biqbaboplfbrettd7655fr4n2y + next: 14.0.0_biqbaboplfbrettd7655fr4n2y oauth4webapi: 2.3.0 openid-client: 5.4.2 tslib: 2.6.2 @@ -736,6 +736,13 @@ packages: dependencies: regenerator-runtime: 0.13.11 + /@babel/runtime/7.23.2: + resolution: {integrity: sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.0 + dev: true + /@eslint-community/eslint-utils/4.4.0_eslint@8.50.0: resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -855,18 +862,18 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 - /@next/env/13.5.6: - resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==} + /@next/env/14.0.0: + resolution: {integrity: sha512-cIKhxkfVELB6hFjYsbtEeTus2mwrTC+JissfZYM0n+8Fv+g8ucUfOlm3VEDtwtwydZ0Nuauv3bl0qF82nnCAqA==} dev: false - /@next/eslint-plugin-next/13.5.4: - resolution: {integrity: sha512-vI94U+D7RNgX6XypSyjeFrOzxGlZyxOplU0dVE5norIfZGn/LDjJYPHdvdsR5vN1eRtl6PDAsOHmycFEOljK5A==} + /@next/eslint-plugin-next/14.0.0: + resolution: {integrity: sha512-Ye37nNI09V3yt7pzuzSQtwlvuJ2CGzFszHXkcTHHZgNr7EhTMFLipn3VSJChy+e5+ahTdNApPphc3qCPUsn10A==} dependencies: glob: 7.1.7 dev: true - /@next/swc-darwin-arm64/13.5.6: - resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==} + /@next/swc-darwin-arm64/14.0.0: + resolution: {integrity: sha512-HQKi159jCz4SRsPesVCiNN6tPSAFUkOuSkpJsqYTIlbHLKr1mD6be/J0TvWV6fwJekj81bZV9V/Tgx3C2HO9lA==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -874,8 +881,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64/13.5.6: - resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==} + /@next/swc-darwin-x64/14.0.0: + resolution: {integrity: sha512-4YyQLMSaCgX/kgC1jjF3s3xSoBnwHuDhnF6WA1DWNEYRsbOOPWjcYhv8TKhRe2ApdOam+VfQSffC4ZD+X4u1Cg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -883,8 +890,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu/13.5.6: - resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==} + /@next/swc-linux-arm64-gnu/14.0.0: + resolution: {integrity: sha512-io7fMkJ28Glj7SH8yvnlD6naIhRDnDxeE55CmpQkj3+uaA2Hko6WGY2pT5SzpQLTnGGnviK85cy8EJ2qsETj/g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -892,8 +899,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl/13.5.6: - resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==} + /@next/swc-linux-arm64-musl/14.0.0: + resolution: {integrity: sha512-nC2h0l1Jt8LEzyQeSs/BKpXAMe0mnHIMykYALWaeddTqCv5UEN8nGO3BG8JAqW/Y8iutqJsaMe2A9itS0d/r8w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -901,8 +908,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu/13.5.6: - resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==} + /@next/swc-linux-x64-gnu/14.0.0: + resolution: {integrity: sha512-Wf+WjXibJQ7hHXOdNOmSMW5bxeJHVf46Pwb3eLSD2L76NrytQlif9NH7JpHuFlYKCQGfKfgSYYre5rIfmnSwQw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -910,8 +917,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl/13.5.6: - resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==} + /@next/swc-linux-x64-musl/14.0.0: + resolution: {integrity: sha512-WTZb2G7B+CTsdigcJVkRxfcAIQj7Lf0ipPNRJ3vlSadU8f0CFGv/ST+sJwF5eSwIe6dxKoX0DG6OljDBaad+rg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -919,8 +926,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc/13.5.6: - resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==} + /@next/swc-win32-arm64-msvc/14.0.0: + resolution: {integrity: sha512-7R8/x6oQODmNpnWVW00rlWX90sIlwluJwcvMT6GXNIBOvEf01t3fBg0AGURNKdTJg2xNuP7TyLchCL7Lh2DTiw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -928,8 +935,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc/13.5.6: - resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==} + /@next/swc-win32-ia32-msvc/14.0.0: + resolution: {integrity: sha512-RLK1nELvhCnxaWPF07jGU4x3tjbyx2319q43loZELqF0+iJtKutZ+Lk8SVmf/KiJkYBc7Cragadz7hb3uQvz4g==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -937,8 +944,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc/13.5.6: - resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==} + /@next/swc-win32-x64-msvc/14.0.0: + resolution: {integrity: sha512-g6hLf1SUko+hnnaywQQZzzb3BRecQsoKkF3o/C+F+dOA4w/noVAJngUVkfwF0+2/8FzNznM7ofM6TGZO9svn7w==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -983,8 +990,8 @@ packages: /@popperjs/core/2.11.8: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - /@rushstack/eslint-patch/1.4.0: - resolution: {integrity: sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==} + /@rushstack/eslint-patch/1.5.1: + resolution: {integrity: sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==} dev: true /@sideway/address/4.1.4: @@ -1482,7 +1489,7 @@ packages: /@types/fslightbox-react/1.7.4: resolution: {integrity: sha512-SlP/3d/qIF6TpslYiGpxxM5y9sZIA01l6bNc8NNpYeZ7POzlmJqRcpYn41PO4Mp6CFsUyiGMYNuRnEZX+H+eNw==} dependencies: - '@types/react': 18.2.14 + '@types/react': 18.2.33 dev: true /@types/json-schema/7.0.13: @@ -1507,15 +1514,15 @@ packages: resolution: {integrity: sha512-NP2yfZpgmf2eDRPmgGq+fjGjSwFgYbihA8/gK+ey23qT9RkxsgNTZvGOEpXgzIGqesTYkElELLgtKoMQTys5vA==} dev: false - /@types/prop-types/15.7.5: - resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} + /@types/prop-types/15.7.9: + resolution: {integrity: sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==} dev: true /@types/react-datepicker/4.15.0_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-kr10s8ex4+MmCJmzdhA9kfmoMQBmsW5uDYDlH+8f/PgStrp7rRaz23Y/cvTiMgvESVq8ujDh4SOo6jlSwEw13g==} dependencies: '@popperjs/core': 2.11.8 - '@types/react': 18.2.14 + '@types/react': 18.2.33 date-fns: 2.30.0 react-popper: 2.3.0_i7i4ysnnic4ssxw6fnjnyxwzui transitivePeerDependencies: @@ -1523,22 +1530,22 @@ packages: - react-dom dev: true - /@types/react-dom/18.2.6: - resolution: {integrity: sha512-2et4PDvg6PVCyS7fuTc4gPoksV58bW0RwSxWKcPRcHZf0PRUGq03TKcD/rUHe3azfV6/5/biUBJw+HhCQjaP0A==} + /@types/react-dom/18.2.14: + resolution: {integrity: sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==} dependencies: - '@types/react': 18.2.14 + '@types/react': 18.2.33 dev: true - /@types/react/18.2.14: - resolution: {integrity: sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g==} + /@types/react/18.2.33: + resolution: {integrity: sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==} dependencies: - '@types/prop-types': 15.7.5 - '@types/scheduler': 0.16.3 + '@types/prop-types': 15.7.9 + '@types/scheduler': 0.16.5 csstype: 3.1.2 dev: true - /@types/scheduler/0.16.3: - resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} + /@types/scheduler/0.16.5: + resolution: {integrity: sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw==} dev: true /@types/semver/7.5.3: @@ -1735,10 +1742,10 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /aria-query/5.1.3: - resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} + /aria-query/5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} dependencies: - deep-equal: 2.2.1 + dequal: 2.0.3 dev: true /array-buffer-byte-length/1.0.0: @@ -1759,6 +1766,17 @@ packages: is-string: 1.0.7 dev: true + /array-includes/3.1.7: + resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 + is-string: 1.0.7 + dev: true + /array-union/2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -1785,6 +1803,16 @@ packages: es-shim-unscopables: 1.0.0 dev: true + /array.prototype.flat/1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: true + /array.prototype.flatmap/1.3.1: resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} engines: {node: '>= 0.4'} @@ -1795,14 +1823,24 @@ packages: es-shim-unscopables: 1.0.0 dev: true - /array.prototype.tosorted/1.1.1: - resolution: {integrity: sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==} + /array.prototype.flatmap/1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 - es-shim-unscopables: 1.0.0 - get-intrinsic: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.tosorted/1.1.2: + resolution: {integrity: sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + get-intrinsic: 1.2.2 dev: true /arraybuffer.prototype.slice/1.0.2: @@ -1854,15 +1892,15 @@ packages: engines: {node: '>= 0.4'} dev: true - /axe-core/4.7.0: - resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} + /axe-core/4.8.2: + resolution: {integrity: sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==} engines: {node: '>=4'} dev: true - /axobject-query/3.1.1: - resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} + /axobject-query/3.2.1: + resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} dependencies: - deep-equal: 2.2.1 + dequal: 2.0.3 dev: true /balanced-match/1.0.2: @@ -1938,6 +1976,14 @@ packages: get-intrinsic: 1.2.1 dev: true + /call-bind/1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + dependencies: + function-bind: 1.1.2 + get-intrinsic: 1.2.2 + set-function-length: 1.1.1 + dev: true + /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -1951,6 +1997,10 @@ packages: resolution: {integrity: sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA==} dev: false + /caniuse-lite/1.0.30001555: + resolution: {integrity: sha512-NzbUFKUnJ3DTcq6YyZB6+qqhfD112uR3uoEnkmfzm2wVzUNsFkU7AwBjKQ654Sp5cau0JxhFyRSn/tQZ+XfygA==} + dev: false + /chalk/4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -1971,7 +2021,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /classnames/2.3.2: resolution: {integrity: sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==} @@ -2087,29 +2137,6 @@ packages: engines: {node: '>=14.16'} dev: false - /deep-equal/2.2.1: - resolution: {integrity: sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ==} - dependencies: - array-buffer-byte-length: 1.0.0 - call-bind: 1.0.2 - es-get-iterator: 1.1.3 - get-intrinsic: 1.2.1 - is-arguments: 1.1.1 - is-array-buffer: 3.0.2 - is-date-object: 1.0.5 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - isarray: 2.0.5 - object-is: 1.1.5 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.1 - side-channel: 1.0.4 - which-boxed-primitive: 1.0.2 - which-collection: 1.0.1 - which-typed-array: 1.1.11 - dev: true - /deep-is/0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -2141,6 +2168,15 @@ packages: has-property-descriptors: 1.0.0 dev: true + /define-data-property/1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + /define-lazy-prop/3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} @@ -2163,6 +2199,11 @@ packages: object-keys: 1.1.1 dev: true + /dequal/2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + dev: true + /didyoumean/1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -2321,35 +2362,66 @@ packages: which-typed-array: 1.1.11 dev: true - /es-get-iterator/1.1.3: - resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} + /es-abstract/1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.2 + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 + es-set-tostringtag: 2.0.2 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.2 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + has-proto: 1.0.1 has-symbols: 1.0.3 - is-arguments: 1.1.1 - is-map: 2.0.2 - is-set: 2.0.2 + hasown: 2.0.0 + internal-slot: 1.0.6 + is-array-buffer: 3.0.2 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 is-string: 1.0.7 - isarray: 2.0.5 - stop-iteration-iterator: 1.0.0 + is-typed-array: 1.1.12 + is-weakref: 1.0.2 + object-inspect: 1.13.1 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.5.1 + safe-array-concat: 1.0.1 + safe-regex-test: 1.0.0 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.13 dev: true /es-iterator-helpers/1.0.15: resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} dependencies: asynciterator.prototype: 1.0.0 - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 - es-set-tostringtag: 2.0.1 - function-bind: 1.1.1 - get-intrinsic: 1.2.1 + es-abstract: 1.22.3 + es-set-tostringtag: 2.0.2 + function-bind: 1.1.2 + get-intrinsic: 1.2.2 globalthis: 1.0.3 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.1 has-proto: 1.0.1 has-symbols: 1.0.3 - internal-slot: 1.0.5 + internal-slot: 1.0.6 iterator.prototype: 1.1.2 safe-array-concat: 1.0.1 dev: true @@ -2363,12 +2435,27 @@ packages: has-tostringtag: 1.0.0 dev: true + /es-set-tostringtag/2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.2 + has-tostringtag: 1.0.0 + hasown: 2.0.0 + dev: true + /es-shim-unscopables/1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: has: 1.0.3 dev: true + /es-shim-unscopables/1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + dependencies: + hasown: 2.0.0 + dev: true + /es-to-primitive/1.2.1: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} @@ -2388,8 +2475,8 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-next/13.5.4_jk7qbkaijtltyu4ajmze3dfiwa: - resolution: {integrity: sha512-FzQGIj4UEszRX7fcRSJK6L1LrDiVZvDFW320VVntVKh3BSU8Fb9kpaoxQx0cdFgf3MQXdeSbrCXJ/5Z/NndDkQ==} + /eslint-config-next/14.0.0_jk7qbkaijtltyu4ajmze3dfiwa: + resolution: {integrity: sha512-jtXeE+/pGQ3h9n11QyyuPN50kO13GO5XvjU5ZRq6W+XTpOMjyobWmK2s7aowy0FtzA49krJzYzEU9s1RMwoJ6g==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -2397,12 +2484,12 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.5.4 - '@rushstack/eslint-patch': 1.4.0 + '@next/eslint-plugin-next': 14.0.0 + '@rushstack/eslint-patch': 1.5.1 '@typescript-eslint/parser': 6.7.3_jk7qbkaijtltyu4ajmze3dfiwa eslint: 8.50.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.6.1_gyqjyyifavsfczauyngji7kw6m + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1_o23aiopppmru2xcybrthvzqwfe eslint-plugin-import: 2.28.1_7juwwq4lilwvkas6knc4dqepxq eslint-plugin-jsx-a11y: 6.7.1_eslint@8.50.0 eslint-plugin-react: 7.33.2_eslint@8.50.0 @@ -2432,6 +2519,16 @@ packages: - supports-color dev: true + /eslint-import-resolver-node/0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + dependencies: + debug: 3.2.7 + is-core-module: 2.13.1 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-import-resolver-typescript/3.6.1_3j3omiadvlpv5rpfrjr5lycjfu: resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2455,7 +2552,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/3.6.1_gyqjyyifavsfczauyngji7kw6m: + /eslint-import-resolver-typescript/3.6.1_o23aiopppmru2xcybrthvzqwfe: resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2465,7 +2562,7 @@ packages: debug: 4.3.4 enhanced-resolve: 5.14.0 eslint: 8.50.0 - eslint-module-utils: 2.8.0_lu5o4ybagphrhgn4ouqblhsfgi + eslint-module-utils: 2.8.0_3mddcwg22vuwxq34sdgo4nhj2a eslint-plugin-import: 2.28.1_7juwwq4lilwvkas6knc4dqepxq fast-glob: 3.3.1 get-tsconfig: 4.5.0 @@ -2478,6 +2575,36 @@ packages: - supports-color dev: true + /eslint-module-utils/2.8.0_3mddcwg22vuwxq34sdgo4nhj2a: + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 6.7.3_jk7qbkaijtltyu4ajmze3dfiwa + debug: 3.2.7 + eslint: 8.50.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1_o23aiopppmru2xcybrthvzqwfe + transitivePeerDependencies: + - supports-color + dev: true + /eslint-module-utils/2.8.0_7juwwq4lilwvkas6knc4dqepxq: resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} @@ -2578,22 +2705,22 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.21.5 - aria-query: 5.1.3 - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 + '@babel/runtime': 7.23.2 + aria-query: 5.3.0 + array-includes: 3.1.7 + array.prototype.flatmap: 1.3.2 ast-types-flow: 0.0.7 - axe-core: 4.7.0 - axobject-query: 3.1.1 + axe-core: 4.8.2 + axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 eslint: 8.50.0 - has: 1.0.3 - jsx-ast-utils: 3.3.3 + has: 1.0.4 + jsx-ast-utils: 3.3.5 language-tags: 1.0.5 minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 + object.entries: 1.1.7 + object.fromentries: 2.0.7 semver: 6.3.1 dev: true @@ -2633,23 +2760,23 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - array.prototype.tosorted: 1.1.1 + array-includes: 3.1.7 + array.prototype.flatmap: 1.3.2 + array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 es-iterator-helpers: 1.0.15 eslint: 8.50.0 estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 + jsx-ast-utils: 3.3.5 minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 + object.entries: 1.1.7 + object.fromentries: 2.0.7 + object.hasown: 1.1.3 + object.values: 1.1.7 prop-types: 15.8.1 - resolve: 2.0.0-next.4 + resolve: 2.0.0-next.5 semver: 6.3.1 - string.prototype.matchall: 4.0.8 + string.prototype.matchall: 4.0.10 dev: true /eslint-plugin-tailwindcss/3.13.0_tailwindcss@3.3.3: @@ -2921,8 +3048,8 @@ packages: /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents/2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -2943,6 +3070,10 @@ packages: /function-bind/1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + /function-bind/1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + /function.prototype.name/1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} engines: {node: '>= 0.4'} @@ -2976,6 +3107,15 @@ packages: has-symbols: 1.0.3 dev: true + /get-intrinsic/1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + dependencies: + function-bind: 1.1.2 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + dev: true + /get-stream/6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -3103,6 +3243,12 @@ packages: get-intrinsic: 1.2.1 dev: true + /has-property-descriptors/1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + dependencies: + get-intrinsic: 1.2.2 + dev: true + /has-proto/1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} @@ -3126,6 +3272,18 @@ packages: dependencies: function-bind: 1.1.1 + /has/1.0.4: + resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} + engines: {node: '>= 0.4.0'} + dev: true + + /hasown/2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + /human-signals/2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -3172,12 +3330,13 @@ packages: side-channel: 1.0.4 dev: true - /is-arguments/1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + /internal-slot/1.0.6: + resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 + get-intrinsic: 1.2.2 + hasown: 2.0.0 + side-channel: 1.0.4 dev: true /is-array-buffer/3.0.2: @@ -3231,6 +3390,12 @@ packages: has: 1.0.3 dev: true + /is-core-module/2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.0 + dev: true + /is-date-object/1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} @@ -3257,7 +3422,7 @@ packages: /is-finalizationregistry/1.0.2: resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 dev: true /is-generator-function/1.0.10: @@ -3379,8 +3544,8 @@ packages: /is-weakset/2.0.2: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 dev: true /is-wsl/2.2.0: @@ -3402,7 +3567,7 @@ packages: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} dependencies: define-properties: 1.2.1 - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 reflect.getprototypeof: 1.0.4 set-function-name: 2.0.1 @@ -3455,12 +3620,14 @@ packages: minimist: 1.2.8 dev: true - /jsx-ast-utils/3.3.3: - resolution: {integrity: sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==} + /jsx-ast-utils/3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} dependencies: - array-includes: 3.1.6 + array-includes: 3.1.7 + array.prototype.flat: 1.3.2 object.assign: 4.1.4 + object.values: 1.1.7 dev: true /language-subtag-registry/0.3.22: @@ -3582,9 +3749,9 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /next/13.5.6_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==} - engines: {node: '>=16.14.0'} + /next/14.0.0_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-J0jHKBJpB9zd4+c153sair0sz44mbaCHxggs8ryVXSFBuBqJ8XdE9/ozoV85xGh2VnSjahwntBZZgsihL9QznA==} + engines: {node: '>=18.17.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -3597,25 +3764,25 @@ packages: sass: optional: true dependencies: - '@next/env': 13.5.6 + '@next/env': 14.0.0 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001487 + caniuse-lite: 1.0.30001555 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 styled-jsx: 5.1.1_react@18.2.0 watchpack: 2.4.0 optionalDependencies: - '@next/swc-darwin-arm64': 13.5.6 - '@next/swc-darwin-x64': 13.5.6 - '@next/swc-linux-arm64-gnu': 13.5.6 - '@next/swc-linux-arm64-musl': 13.5.6 - '@next/swc-linux-x64-gnu': 13.5.6 - '@next/swc-linux-x64-musl': 13.5.6 - '@next/swc-win32-arm64-msvc': 13.5.6 - '@next/swc-win32-ia32-msvc': 13.5.6 - '@next/swc-win32-x64-msvc': 13.5.6 + '@next/swc-darwin-arm64': 14.0.0 + '@next/swc-darwin-x64': 14.0.0 + '@next/swc-linux-arm64-gnu': 14.0.0 + '@next/swc-linux-arm64-musl': 14.0.0 + '@next/swc-linux-x64-gnu': 14.0.0 + '@next/swc-linux-x64-musl': 14.0.0 + '@next/swc-win32-arm64-msvc': 14.0.0 + '@next/swc-win32-ia32-msvc': 14.0.0 + '@next/swc-win32-x64-msvc': 14.0.0 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -3669,12 +3836,8 @@ packages: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true - /object-is/1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.1 + /object-inspect/1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true /object-keys/1.1.1: @@ -3692,13 +3855,13 @@ packages: object-keys: 1.1.1 dev: true - /object.entries/1.1.6: - resolution: {integrity: sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==} + /object.entries/1.1.7: + resolution: {integrity: sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 dev: true /object.fromentries/2.0.6: @@ -3710,6 +3873,15 @@ packages: es-abstract: 1.21.2 dev: true + /object.fromentries/2.0.7: + resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + /object.groupby/1.0.1: resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} dependencies: @@ -3719,11 +3891,11 @@ packages: get-intrinsic: 1.2.1 dev: true - /object.hasown/1.1.2: - resolution: {integrity: sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==} + /object.hasown/1.1.3: + resolution: {integrity: sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==} dependencies: define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 dev: true /object.values/1.1.6: @@ -3735,6 +3907,15 @@ packages: es-abstract: 1.22.2 dev: true + /object.values/1.1.7: + resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + /oidc-token-hash/5.0.3: resolution: {integrity: sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw==} engines: {node: ^10.13.0 || >=12.0.0} @@ -4098,10 +4279,10 @@ packages: resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 - get-intrinsic: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 globalthis: 1.0.3 which-builtin-type: 1.1.3 dev: true @@ -4109,6 +4290,10 @@ packages: /regenerator-runtime/0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime/0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + dev: true + /regexp.prototype.flags/1.5.0: resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} engines: {node: '>= 0.4'} @@ -4140,11 +4325,20 @@ packages: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - /resolve/2.0.0-next.4: - resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} + /resolve/1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.13.0 + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve/2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + dependencies: + is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -4208,6 +4402,16 @@ packages: lru-cache: 6.0.0 dev: true + /set-function-length/1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + /set-function-name/2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -4255,28 +4459,22 @@ packages: engines: {node: '>=12'} dev: false - /stop-iteration-iterator/1.0.0: - resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} - engines: {node: '>= 0.4'} - dependencies: - internal-slot: 1.0.5 - dev: true - /streamsearch/1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} dev: false - /string.prototype.matchall/4.0.8: - resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} + /string.prototype.matchall/4.0.10: + resolution: {integrity: sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 - get-intrinsic: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 - internal-slot: 1.0.5 + internal-slot: 1.0.6 regexp.prototype.flags: 1.5.1 + set-function-name: 2.0.1 side-channel: 1.0.4 dev: true @@ -4663,7 +4861,7 @@ packages: isarray: 2.0.5 which-boxed-primitive: 1.0.2 which-collection: 1.0.1 - which-typed-array: 1.1.11 + which-typed-array: 1.1.13 dev: true /which-collection/1.0.1: @@ -4686,6 +4884,17 @@ packages: has-tostringtag: 1.0.0 dev: true + /which-typed-array/1.1.13: + resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + dev: true + /which-typed-array/1.1.9: resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} engines: {node: '>= 0.4'} diff --git a/src/actions/cacheActions.ts b/src/actions/cacheActions.ts index c4b3244..f10ca3d 100644 --- a/src/actions/cacheActions.ts +++ b/src/actions/cacheActions.ts @@ -7,9 +7,8 @@ export const revalidateFeaturesAction = async () => { revalidateTag(apiTags.getFeaturesList()); }; -export const revalidateBrandsAndModelsAction = async () => { +export const revalidateBrandsAction = async () => { revalidateTag(apiTags.getVehicleBrands()); - revalidateTag(apiTags.getVehicleModels()); }; export const revalidatePosedListingsAction = async () => { diff --git a/src/actions/localtionActions.ts b/src/actions/localtionActions.ts new file mode 100644 index 0000000..fdcb752 --- /dev/null +++ b/src/actions/localtionActions.ts @@ -0,0 +1,6 @@ +"use server"; +import { api } from "@/utils/api"; + +export const getStatesOfCountry = async (countryCode: string) => api.getStates(countryCode); + +export const getCitiesOfState = async (countryCode: string, stateCode: string) => api.getCities(countryCode, stateCode); diff --git a/src/app/[locale]/dashboard/listings/edit/[id]/page.tsx b/src/app/[locale]/dashboard/listings/edit/[id]/page.tsx index fcb67bd..5441781 100644 --- a/src/app/[locale]/dashboard/listings/edit/[id]/page.tsx +++ b/src/app/[locale]/dashboard/listings/edit/[id]/page.tsx @@ -1,3 +1,4 @@ +import { getSession } from "@auth0/nextjs-auth0/edge"; import { BreadCrumbs } from "@/components/Common"; import { EditListingForm } from "@/components/Forms/Listings/EditListingForm"; import { api } from "@/utils/api"; @@ -5,7 +6,13 @@ import { transformListingResponse } from "@/utils/helpers"; import { ListingIdPathParam } from "@/utils/types"; export default async function Page({ params }: ListingIdPathParam) { - const [itemDetails, features] = await Promise.all([transformListingResponse(await api.getListingsItem(params.id)), api.getFeaturesList()]); + const session = await getSession(); + const [itemDetails, features, brands, profile] = await Promise.all([ + transformListingResponse(await api.getListingsItem(params.id)), + api.getFeaturesList(), + api.getVehicleBrands(), + api.getMyProfileDetails(session?.user?.sub!), + ]); return ( <> @@ -18,7 +25,14 @@ export default async function Page({ params }: ListingIdPathParam) { { title: itemDetails.title, href: `/dashboard/listings/${params.id}` }, ]} /> - + ); } diff --git a/src/app/[locale]/dashboard/my-listings/edit/[id]/page.tsx b/src/app/[locale]/dashboard/my-listings/edit/[id]/page.tsx index d6be4f6..c9c4123 100644 --- a/src/app/[locale]/dashboard/my-listings/edit/[id]/page.tsx +++ b/src/app/[locale]/dashboard/my-listings/edit/[id]/page.tsx @@ -1,3 +1,4 @@ +import { getSession } from "@auth0/nextjs-auth0/edge"; import { BreadCrumbs } from "@/components/Common"; import { EditListingForm } from "@/components/Forms/Listings/EditListingForm"; import { api } from "@/utils/api"; @@ -5,7 +6,13 @@ import { transformListingResponse } from "@/utils/helpers"; import { ListingIdPathParam } from "@/utils/types"; export default async function Page({ params }: ListingIdPathParam) { - const [itemDetails, features] = await Promise.all([transformListingResponse(await api.getMyListingsItem(params.id)), api.getFeaturesList()]); + const session = await getSession(); + const [itemDetails, features, brands, profile] = await Promise.all([ + transformListingResponse(await api.getMyListingsItem(params.id)), + api.getFeaturesList(), + api.getVehicleBrands(), + api.getMyProfileDetails(session?.user?.sub!), + ]); return ( <> @@ -21,7 +28,14 @@ export default async function Page({ params }: ListingIdPathParam) { }, ]} /> - + ); } diff --git a/src/app/[locale]/dashboard/new-listing/page.tsx b/src/app/[locale]/dashboard/new-listing/page.tsx index 4e38ad9..53c8ec1 100644 --- a/src/app/[locale]/dashboard/new-listing/page.tsx +++ b/src/app/[locale]/dashboard/new-listing/page.tsx @@ -4,6 +4,10 @@ import { api } from "@/utils/api"; export default async function Page() { const session = await getSession(); - const [features, profile] = await Promise.all([api.getFeaturesList(), api.getMyProfileDetails(session?.user?.sub!)]); - return ; + const [features, profile, brands] = await Promise.all([ + api.getFeaturesList(), + api.getMyProfileDetails(session?.user?.sub!), + api.getVehicleBrands(), + ]); + return ; } diff --git a/src/app/[locale]/search/(list)/@searchFilters/(page)/page.tsx b/src/app/[locale]/search/(list)/@searchFilters/(page)/page.tsx index c636835..232ff20 100644 --- a/src/app/[locale]/search/(list)/@searchFilters/(page)/page.tsx +++ b/src/app/[locale]/search/(list)/@searchFilters/(page)/page.tsx @@ -1,5 +1,8 @@ import { SearchFilters } from "@/components/Search"; +import { api } from "@/utils/api"; +import { LocalePathParam } from "@/utils/types"; -export default async function Page() { - return ; +export default async function Page({ params }: LocalePathParam) { + const [brands, states] = await Promise.all([api.getVehicleBrands(), api.getStates(params.locale)]) + return ; } diff --git a/src/app/[locale]/search/(list)/@searchGrid/(page)/page.tsx b/src/app/[locale]/search/(list)/@searchGrid/(page)/page.tsx index fabdfc6..22cd0b4 100644 --- a/src/app/[locale]/search/(list)/@searchGrid/(page)/page.tsx +++ b/src/app/[locale]/search/(list)/@searchGrid/(page)/page.tsx @@ -9,7 +9,7 @@ import { LocalePathParam, SearchParams } from "@/utils/types"; export default async function Page({ searchParams, params }: SearchParams & LocalePathParam) { const page = searchParams["PageNumber"] ?? "1"; const parsedSearchParams = PostedListingsFilterSchema.parse(searchParams); - const listings = transformListingsListResponse(await api.getPostedListings({ PageNumber: Number(page), PageSize: 12, ...parsedSearchParams })); + const listings = transformListingsListResponse(await api.getPostedListings(params.locale, { PageNumber: Number(page), PageSize: 12, ...parsedSearchParams })); if (listings.items?.length === 0 && page !== "1") { redirect(`/${params.locale}/search?${qs.stringify({ ...parsedSearchParams, PageNumber: 1 }, { skipEmptyString: true })}`); diff --git a/src/components/Common/ListingItem/ListingItem.tsx b/src/components/Common/ListingItem/ListingItem.tsx index c277eed..be98d37 100644 --- a/src/components/Common/ListingItem/ListingItem.tsx +++ b/src/components/Common/ListingItem/ListingItem.tsx @@ -1,8 +1,9 @@ import { clsx } from "clsx"; import { FC } from "react"; import { LinkWithLocale, ListingImage } from "@/components/Common"; -import { getFormattedCurrency, getLocationString, getRandomItem, numberWithCommas, timeAgo, unCamelCase } from "@/utils/helpers"; +import { getFormattedCurrency, getFormattedDistance, getLocationString, getRandomItem, numberWithCommas, timeAgo, unCamelCase } from "@/utils/helpers"; import { ListingItem as ListingItemType } from "@/utils/types"; +import { COUNTRIES } from "@/utils/countries"; interface Props { detailed?: boolean; @@ -15,6 +16,8 @@ export const ListingItem: FC = ({ item, detailed = false, loading, tinted const vehicleImages = item?.vehicle?.vehicleImages || []; const image = vehicleImages[0]; + // todo: check how the white overlay loading screen looks like in landing page + const ListingItemContent = ( <>
@@ -31,18 +34,18 @@ export const ListingItem: FC = ({ item, detailed = false, loading, tinted width={450} /> ) : ( -
+
)} {tinted &&
} -
+
{item ? (
- {getFormattedCurrency(item?.price?.amount, item?.price?.currency)} + {getFormattedCurrency(item?.price?.amount, item?.price?.currencySymbol)}
) : ( -
+
)} {item ? ( @@ -55,25 +58,25 @@ export const ListingItem: FC = ({ item, detailed = false, loading, tinted {item?.title}
) : ( -
+
)}
-
+
{item ? ( -
{getLocationString(item?.location)}
+
{getLocationString(item?.location, COUNTRIES[item?.location?.country ?? '']?.[0])}
) : ( -
+
)}
{item ? (
{`${unCamelCase(item?.vehicle?.condition)} ${ - item?.vehicle?.millage ? `| ${numberWithCommas(item?.vehicle?.millage)} km ` : "" + item?.vehicle?.millage ? `| ${getFormattedDistance(item?.vehicle?.millage.distance,item?.location?.country)} ` : "" }| ${unCamelCase(item?.vehicle?.type)}`}
) : ( -
+
)} {detailed && item?.createdOn &&
{timeAgo(new Date(item?.createdOn))}
}
diff --git a/src/components/Common/Modal/Modal.tsx b/src/components/Common/Modal/Modal.tsx index 1569683..1432600 100644 --- a/src/components/Common/Modal/Modal.tsx +++ b/src/components/Common/Modal/Modal.tsx @@ -3,6 +3,7 @@ import { FC, PropsWithChildren } from "react"; interface Props { cancelable?: boolean; + childrenClassnames?: string; modalClassnames?: string; onVisibleChange: (visible: boolean) => void; title?: string; @@ -17,19 +18,23 @@ export const Modal: FC> = ({ children, title, titleClassNames, + childrenClassnames, cancelable = true, }) => { return ( <>
-
event.preventDefault()}> +
event.preventDefault()}> {cancelable && ( - )} -
{title}
-
{children}
+
{title}
+
{children}