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

View file

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

View file

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