diff --git a/eslint.config.js b/eslint.config.js index ae539fd..0f68b14 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,7 +3,7 @@ import eslintConfigPrettier from 'eslint-config-prettier' import eslintPluginAstro from 'eslint-plugin-astro' -const neoConfig = neostandard({ ignores: resolveIgnoresFromGitignore(), noStyle: true, ts: true}) +const neoConfig = neostandard({ ignores: resolveIgnoresFromGitignore(), noStyle: true, ts: true }) /** @type {import("eslint").Linter.Config} */ export default [ @@ -15,6 +15,7 @@ export default [ 'no-undef': 'error' } }, + { env: { browser: true } }, ...eslintPluginAstro.configs.recommended, - eslintConfigPrettier, + eslintConfigPrettier ] diff --git a/messages/en.json b/messages/en.json index bf80d30..9fe4566 100644 --- a/messages/en.json +++ b/messages/en.json @@ -28,5 +28,9 @@ "managesubmissions": "Manage Submissions", "profilePic": "Profile picture", "emailSuccess": "An email with further instructions has been sent to the address linked to the account. Check your spam folder.", - "close": "Close" -} \ No newline at end of file + "close": "Close", + "newPassword": "New password", + "newPasswordRetype": "Re-type new password", + "savePassword": "Save Password", + "passwordResetSuccesful": "Password reset succesfully" +} diff --git a/package.json b/package.json index f1c4d1c..b42206a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@astrojs/node": "9.0.0", "@astrojs/react": "4.1.3", "@astrojs/rss": "4.0.11", - "@astrojs/tailwind": "5.1.4", + "@astrojs/tailwind": "^6.0.0", "@inlang/paraglide-astro": "^0.2.2", "@prisma/client": "^6.2.1", "@types/react": "^18.3.12", @@ -31,7 +31,7 @@ "react-hot-toast": "^2.4.1", "react-svg-spinners": "^0.3.1", "sharp": "^0.33.5", - "tailwindcss": "^3.4.12", + "tailwindcss": "^3.4.17", "typescript": "^5.6.2" }, "devDependencies": { diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 84c47ad..5e84ce0 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,8 +1,10 @@ -import type { PropsWithChildren } from 'react' +import type { PropsWithChildren, JSX } from 'react' import clsx from 'clsx' import { BarsRotateFade } from 'react-svg-spinners' -export default function Button(props: PropsWithChildren<{ className?: string; loading?: boolean }>) { +export default function Button( + props: PropsWithChildren<{ className?: string; loading?: boolean }> & JSX.IntrinsicElements['button'] +) { const { children, className, loading = false, ...restProps } = props return ( + + + + + ) +} diff --git a/src/components/Header.astro b/src/components/Header.astro index f7a0c4b..163e6d5 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -27,7 +27,7 @@ const { value: bannerPosition } = (await prismaClient.config.findUnique({ where: height={150} /> -
+
}>) { +export default function Modal(props: PropsWithChildren<{ setOpen?: SetState }>) { const { children, setOpen } = props useEffect(() => { - const handleEsc = (ev: KeyboardEvent) => { - if (ev.code === 'Escape') setOpen(false) + const handleEsc = (ev: any) => { + if ((ev as KeyboardEvent).code === 'Escape' && setOpen) setOpen(false) } window.addEventListener('keydown', handleEsc) @@ -17,11 +17,13 @@ export default function Modal(props: PropsWithChildren<{ setOpen: SetState setOpen(false)} + className='fixed size-full flex bg-black bg-opacity-50 left-0 top-0 z-50 p-4 justify-center items-center' + onClick={() => { + if (setOpen) setOpen(false) + }} >
ev.stopPropagation()} diff --git a/src/components/header/Dropdown.astro b/src/components/header/Dropdown.astro index df00522..935e219 100644 --- a/src/components/header/Dropdown.astro +++ b/src/components/header/Dropdown.astro @@ -3,7 +3,7 @@ import NavButton from './NavButton.astro' --- - +