Skip to content

Commit 32bc507

Browse files
committed
feat: update pre-commit hook, fix lint command, and enhance layout script loading
1 parent 3a01323 commit 32bc507

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

.husky/pre-commit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
32

43
set -e # die on error
54

5+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
6+
67
if command -v pnpm >/dev/null 2>&1; then
8+
cd "$REPO_ROOT"
79
pnpm run lint
810
else
911
echo "pnpm not found. Skipping lint." >&2

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default defineConfig([
1111
"build/**",
1212
"next-env.d.ts",
1313
"content/**",
14-
"src/react-src/**"
14+
"public/**",
15+
"react-src/**"
1516
])
1617
]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "next dev",
88
"build": "next build",
99
"start": "next start",
10-
"lint": "next lint",
10+
"lint": "eslint .",
1111
"test:e2e": "playwright test",
1212
"prepare": "husky"
1313
},

react-src/maven-prs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default function MavenPRs({status}: { status?: string }) {
6969
}
7070

7171
fetchPRs();
72-
}, []);
72+
}, [status]);
7373

7474
if (!prs) return <div>Keine Pull Requests gefunden</div>;
7575

src/app/[locale]/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { notFound } from 'next/navigation';
44
import { routing } from '@/i18n/routing';
55
import type { Metadata } from 'next'
66
import { Montserrat } from 'next/font/google'
7+
import Script from 'next/script'
78
import '../globals.css'
89
import Navbar from '@/components/Navbar'
910
import Footer from '@/components/Footer'
@@ -85,7 +86,7 @@ export default async function LocaleLayout({
8586
<main>{children}</main>
8687
<Footer locale={locale} />
8788
</div>
88-
<script src="https://code.iconify.design/2/2.2.1/iconify.min.js"></script>
89+
<Script src="https://code.iconify.design/2/2.2.1/iconify.min.js" strategy="afterInteractive" />
8990
</NextIntlClientProvider>
9091
</body>
9192
</html>

0 commit comments

Comments
 (0)