page title

This commit is contained in:
Cypro Freelance 2024-08-01 20:32:06 +05:30
parent 41f190d5bf
commit 3db4004354
3 changed files with 50 additions and 38 deletions

View file

@ -38,19 +38,23 @@ const Page = ({ params }: { params: { slug: string } }) => {
}, [slug]); }, [slug]);
if (loading) { if (loading) {
document.title = "Mods Change Logs - SVRJS";
return ( return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col"> <>
<div className="mb-3"> <head>
<Skeleton className="w-[400px] h-[50px] rounded-md" /> <title>Mods Change Logs - SVRJS</title>
</div> </head>
<div className="flex flex-col gap-4"> <section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<Skeleton className="w-[300px] h-[30px] rounded-md" /> <div className="mb-3">
<Skeleton className="w-[200px] h-[20px] rounded-md" /> <Skeleton className="w-[400px] h-[50px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" /> </div>
<Skeleton className="w-[200px] h-[20px] rounded-md" /> <div className="flex flex-col gap-4">
</div> <Skeleton className="w-[300px] h-[30px] rounded-md" />
</section> <Skeleton className="w-[200px] h-[20px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" />
</div>
</section>
</>
); );
} }

View file

@ -54,19 +54,23 @@ const LogsPage: React.FC = () => {
const reversedDownloads = [...downloads].reverse(); const reversedDownloads = [...downloads].reverse();
if (loading) { if (loading) {
document.title = "Change Logs - SVRJS";
return ( return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col"> <>
<div className="mb-3"> <head>
<Skeleton className="w-[400px] h-[50px] rounded-md" /> <title>Change Logs - SVRJS</title>
</div> </head>
<div className="flex flex-col gap-4"> <section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<Skeleton className="w-[300px] h-[30px] rounded-md" /> <div className="mb-3">
<Skeleton className="w-[200px] h-[20px] rounded-md" /> <Skeleton className="w-[400px] h-[50px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" /> </div>
<Skeleton className="w-[200px] h-[20px] rounded-md" /> <div className="flex flex-col gap-4">
</div> <Skeleton className="w-[300px] h-[30px] rounded-md" />
</section> <Skeleton className="w-[200px] h-[20px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" />
</div>
</section>
</>
); );
} }

View file

@ -37,7 +37,7 @@ const Vulnerabilities = () => {
if (response.ok) { if (response.ok) {
const data: Vulnerabilities[] = await response.json(); const data: Vulnerabilities[] = await response.json();
setDownloads(data); setDownloads(data);
document.title = "Vulnerabilities - SVRJS"; return (document.title = "Vulnerabilities - SVRJS");
} else { } else {
throw new Error(`HTTP error! status: ${response.status}`); throw new Error(`HTTP error! status: ${response.status}`);
} }
@ -60,7 +60,7 @@ const Vulnerabilities = () => {
(mod) => mod.vulnerabilities && mod.vulnerabilities.trim() !== "" (mod) => mod.vulnerabilities && mod.vulnerabilities.trim() !== ""
); );
setMods(filteredMods); setMods(filteredMods);
document.title = "Vulnerabilities - SVRJS"; return (document.title = "Vulnerabilities - SVRJS");
} else { } else {
throw new Error(`HTTP error! status: ${response.status}`); throw new Error(`HTTP error! status: ${response.status}`);
} }
@ -86,19 +86,23 @@ const Vulnerabilities = () => {
const reversedMods = [...mods].reverse(); const reversedMods = [...mods].reverse();
if (loading) { if (loading) {
document.title = "Vulnerabilities - SVRJS";
return ( return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col"> <>
<div className="mb-3"> <head>
<Skeleton className="w-[400px] h-[50px] rounded-md" /> <title>Vulnerabilities - SVRJS</title>
</div> </head>
<div className="flex flex-col gap-4"> <section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<Skeleton className="w-[300px] h-[30px] rounded-md" /> <div className="mb-3">
<Skeleton className="w-[200px] h-[20px] rounded-md" /> <Skeleton className="w-[400px] h-[50px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" /> </div>
<Skeleton className="w-[200px] h-[20px] rounded-md" /> <div className="flex flex-col gap-4">
</div> <Skeleton className="w-[300px] h-[30px] rounded-md" />
</section> <Skeleton className="w-[200px] h-[20px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" />
<Skeleton className="w-[200px] h-[20px] rounded-md" />
</div>
</section>
</>
); );
} }