refactor(TenderDetails): improve country flag validation and rendering logic
- Enhanced the validation of country codes in the TenderDetails component using a new utility function. - Updated the useGetFlagQuery hook to include an options parameter for conditional fetching based on country code validity. - Refined the rendering logic to ensure country flags are displayed only when valid data is available.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { Metadata } from "next";
|
||||
import type { PropsWithChildren } from "react";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Page not found",
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
|
||||
export default function NotFoundRouteLayout({ children }: PropsWithChildren) {
|
||||
return (
|
||||
<div className="flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-10 md:px-6 md:py-16 2xl:px-10">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
interface IProps {}
|
||||
|
||||
const NotFoundPage = ({}: IProps) => {
|
||||
return (
|
||||
<div className="mx-auto flex w-6/12 flex-col gap-12">
|
||||
<section className="flex w-full items-center justify-center">
|
||||
<Image src={"/404.svg"} alt="404" width={700} height={1000} />
|
||||
</section>
|
||||
<section>
|
||||
<div>
|
||||
<Image
|
||||
src={"/cable.svg"}
|
||||
width={2000}
|
||||
height={3000}
|
||||
alt="not connected cable"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
<section className="mt-10 flex flex-col items-center justify-center gap-10">
|
||||
<h1 className="text-2xl font-bold">Page not found</h1>
|
||||
<p className="text-[16px] font-semibold text-[#77707f]">
|
||||
Sorry, the page you're looking for does not exist or has been removed.{" "}
|
||||
<br />
|
||||
You can navigate to Home using
|
||||
<Link href="/" className="mx-1 text-primary">
|
||||
This
|
||||
</Link>
|
||||
link.
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFoundPage;
|
||||
Reference in New Issue
Block a user