-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Hasnainahmad04/feat/ui-upgrade
Feat/UI upgrade
- Loading branch information
Showing
34 changed files
with
919 additions
and
995 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,29 @@ | ||
{ | ||
// Configuration for JavaScript files | ||
"plugins": ["import"], | ||
"extends": [ | ||
"airbnb-base", | ||
"next/core-web-vitals", // Needed to avoid warning in next.js build: 'The Next.js plugin was not detected in your ESLint configuration' | ||
"plugin:prettier/recommended" | ||
"next/core-web-vitals", | ||
"plugin:tailwindcss/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"no-undef": "off", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index" | ||
], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
] // Avoid conflict rule between Prettier and Airbnb Eslint | ||
}, | ||
"overrides": [ | ||
// Configuration for TypeScript files | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx", "**/*.mts"], | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"unused-imports", | ||
"tailwindcss", | ||
"simple-import-sort" | ||
], | ||
"extends": [ | ||
"plugin:tailwindcss/recommended", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"next/core-web-vitals", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/lines-between-class-members": "off", | ||
"@typescript-eslint/no-throw-literal": "off", | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} | ||
], // Avoid conflict rule between Prettier and Airbnb Eslint | ||
"import/extensions": "off", // Avoid missing file extension errors, TypeScript already provides a similar feature | ||
"react/function-component-definition": "off", // Disable Airbnb's specific function type | ||
"react/destructuring-assignment": "off", // Vscode doesn't support automatically destructuring, it's a pain to add a new variable | ||
"react/require-default-props": "off", // Allow non-defined react props as undefined | ||
"react/jsx-props-no-spreading": "off", // _app.tsx uses spread operator and also, react-hook-form | ||
"@typescript-eslint/comma-dangle": "off", // Avoid conflict rule between Eslint and Prettier | ||
"@typescript-eslint/consistent-type-imports": "error", // Ensure import type is used when it's necessary | ||
"no-restricted-syntax": [ | ||
"error", | ||
"ForInStatement", | ||
"LabeledStatement", | ||
"WithStatement" | ||
], // Overrides Airbnb configuration and enable no-restricted-syntax | ||
"import/prefer-default-export": "off", // Named export is easier to refactor automatically | ||
"simple-import-sort/imports": "error", // Import configuration for eslint-plugin-simple-import-sort | ||
"simple-import-sort/exports": "error", // Export configuration for eslint-plugin-simple-import-sort | ||
"import/order": "off", // Avoid conflict rule between eslint-plugin-import and eslint-plugin-simple-import-sort | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": [ | ||
"error", | ||
{ "argsIgnorePattern": "^_" } | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use client'; | ||
|
||
import Image from 'next/image'; | ||
import { useEffect } from 'react'; | ||
|
||
import { Button } from '@/components/ui/button'; | ||
|
||
export default function Error({ | ||
error, | ||
reset, | ||
}: { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}) { | ||
useEffect(() => { | ||
// Log the error to an error reporting service | ||
console.error(error); | ||
}, [error]); | ||
|
||
return ( | ||
<main className="prose mx-auto flex h-[calc(100vh-4.5rem)] w-full flex-col items-center justify-center text-center"> | ||
<Image | ||
src="/server-error.svg" | ||
width={500} | ||
height={500} | ||
alt="server_error" | ||
className="size-80" | ||
/> | ||
<h2>Something went wrong!</h2> | ||
<p className="text-lg"> | ||
We encountered an unexpected error. Please try refreshing the page or | ||
come back later. If the problem persists, contact support for | ||
assistance. | ||
</p> | ||
<Button variant="destructive" onClick={() => reset()} className="mt-6"> | ||
Try again | ||
</Button> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.