Skip to content

Commit 608a7ac

Browse files
fix: resolve Next.js warnings and SVG path errors (#98)
* fix: move viewport metadata to separate export - Remove viewport from metadata export in layout.tsx - Add separate viewport export following Next.js 14+ conventions - Fixes unsupported metadata viewport warning * fix: resolve Next.js warnings and SVG path errors - Move viewport metadata to separate export in layout.tsx (Next.js 14+ compliance) - Fix malformed SVG arc command in CategorySidebar.tsx key icon - Add allowedDevOrigins configuration for cross-origin requests from local networks - Support all private network ranges without hardcoding specific IPs
1 parent ff1ab35 commit 608a7ac

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

next.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,30 @@ const config = {
1818
},
1919
],
2020
},
21+
// Allow cross-origin requests from local network ranges
22+
allowedDevOrigins: [
23+
'http://localhost:3000',
24+
'http://127.0.0.1:3000',
25+
'http://[::1]:3000',
26+
'http://10.*',
27+
'http://172.16.*',
28+
'http://172.17.*',
29+
'http://172.18.*',
30+
'http://172.19.*',
31+
'http://172.20.*',
32+
'http://172.21.*',
33+
'http://172.22.*',
34+
'http://172.23.*',
35+
'http://172.24.*',
36+
'http://172.25.*',
37+
'http://172.26.*',
38+
'http://172.27.*',
39+
'http://172.28.*',
40+
'http://172.29.*',
41+
'http://172.30.*',
42+
'http://172.31.*',
43+
'http://192.168.*',
44+
],
2145
};
2246

2347
export default config;

src/app/_components/CategorySidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const CategoryIcon = ({ iconName, className = "w-5 h-5" }: { iconName: string; c
4040
),
4141
key: (
4242
<svg className={className} fill="none" stroke="currentColor" viewBox="0 0 24 24">
43-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z" />
43+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1 0 21 9z" />
4444
</svg>
4545
),
4646
archive: (

src/app/layout.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
import "~/styles/globals.css";
22

3-
import { type Metadata } from "next";
3+
import { type Metadata, type Viewport } from "next";
44
import { Geist } from "next/font/google";
55

66
import { TRPCReactProvider } from "~/trpc/react";
77

88
export const metadata: Metadata = {
99
title: "PVE Scripts local",
1010
description: "Manage and execute Proxmox helper scripts locally with live output streaming",
11-
viewport: "width=device-width, initial-scale=1, maximum-scale=1",
1211
icons: [
1312
{ rel: "icon", url: "/favicon.png", type: "image/png" },
1413
{ rel: "icon", url: "/favicon.ico", sizes: "any" },
1514
{ rel: "apple-touch-icon", url: "/favicon.png" },
1615
],
1716
};
1817

18+
export const viewport: Viewport = {
19+
width: "device-width",
20+
initialScale: 1,
21+
maximumScale: 1,
22+
};
23+
1924
const geist = Geist({
2025
subsets: ["latin"],
2126
variable: "--font-jetbrains-mono",

0 commit comments

Comments
 (0)