Compare commits

...

6 Commits

7 changed files with 38 additions and 0 deletions

View File

@@ -1,4 +1,7 @@
"use client"; "use client";
export const dynamic = "force-dynamic";
import { useState } from "react"; import { useState } from "react";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";

View File

@@ -1,4 +1,7 @@
"use client"; "use client";
export const dynamic = "force-dynamic";
import { useQuery, useMutation } from "@tanstack/react-query"; import { useQuery, useMutation } from "@tanstack/react-query";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";

View File

@@ -1,4 +1,5 @@
'use client'; 'use client';
export const dynamic = 'force-dynamic';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation'; import { useRouter } from 'next/navigation';

View File

@@ -1,4 +1,7 @@
"use client"; "use client";
export const dynamic = "force-dynamic";
import { useState } from "react"; import { useState } from "react";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";

View File

@@ -6,6 +6,8 @@ import Providers from '@/components/providers';
// Fonts are loaded via CSS @import in globals.css (runtime CDN load). // Fonts are loaded via CSS @import in globals.css (runtime CDN load).
// CSS vars are set directly in globals.css :root — no JS injection needed. // CSS vars are set directly in globals.css :root — no JS injection needed.
export const dynamic = 'force-dynamic';
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'FiberOps Admin', title: 'FiberOps Admin',
description: 'ISP Management Platform', description: 'ISP Management Platform',

12
pages/_document.tsx Normal file
View File

@@ -0,0 +1,12 @@
import { Html, Head, Main, NextScript } from 'next/document';
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}

14
pages/_error.tsx Normal file
View File

@@ -0,0 +1,14 @@
// Custom error page — prevents Html import issue in Next.js pages router
export default function Error({ statusCode }: { statusCode?: number }) {
return (
<div style={{ padding: '2rem', fontFamily: 'sans-serif' }}>
<h1>{statusCode || 'Error'}</h1>
<p>{statusCode === 404 ? 'Page not found' : 'An error occurred'}</p>
</div>
);
}
Error.getInitialProps = ({ res, err }: any) => {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
return { statusCode };
};