1
0
mirror of https://github.com/XFox111/my-website.git synced 2026-04-22 07:28:01 +03:00

feat!: site refresh + dependency update

This commit is contained in:
2025-12-11 05:51:44 +00:00
parent aac9140830
commit 57b3a72fa2
48 changed files with 4943 additions and 1743 deletions
+23 -11
View File
@@ -1,6 +1,6 @@
import ChatWarningRegular from "@fluentui/svg-icons/icons/chat_warning_24_regular.svg";
import React from "react";
import cls from "./AlertMessage.module.scss";
import { ChatWarningRegular } from "@fluentui/react-icons";
/**
* This alert box displays a custom message at the top of the homepage.
@@ -13,7 +13,7 @@ import { ChatWarningRegular } from "@fluentui/react-icons";
* - The file located at ALERT_TEXT_URL is accessible, not empty, and returns successfull HTTP status code (2xx)
*/
const AlertMessage: React.FC = async () =>
async function fetchAlert(): Promise<[string, string, string] | null>
{
if (!process.env.ALERT_TEXT_URL)
return null;
@@ -29,20 +29,32 @@ const AlertMessage: React.FC = async () =>
const title: string = alertText.split("\n", 1)[0].trim();
const message: string = alertText.substring(title.length + 1).trim();
return (
<div role="alert" className={ cls.alertBox } aria-label={ alertText }>
<ChatWarningRegular className={ cls.icon } />
<div>
<p className={ cls.title }>{ title }</p>
<p className={ cls.message } dangerouslySetInnerHTML={ { __html: message } } />
</div>
</div>
);
return [alertText, title, message];
}
catch
{
return null;
}
}
const AlertMessage: React.FC = async () =>
{
const result = await fetchAlert();
if (!result)
return null;
const [alertText, title, message] = result;
return (
<div role="alert" className={ cls.alertBox } aria-label={ alertText }>
<ChatWarningRegular className={ cls.icon } />
<div>
<p className={ cls.title }>{ title }</p>
<p className={ cls.message } dangerouslySetInnerHTML={ { __html: message } } />
</div>
</div>
);
};
export default AlertMessage;
+1
View File
@@ -15,6 +15,7 @@ const CookieBanner: React.FC = () =>
return;
const choice = getCookieChoice();
// eslint-disable-next-line react-hooks/set-state-in-effect
setVisible(choice === "none");
// Since Clarity cookies expiration dates extend well beyond 60 days,
+1
View File
@@ -10,6 +10,7 @@ const RevokeConsentButton: React.FC = () =>
useEffect(() =>
{
// eslint-disable-next-line react-hooks/set-state-in-effect
setHasConsent(getCookieChoice() === "accepted");
}, []);
+2 -1
View File
@@ -2,7 +2,8 @@
import links from "@/_data/links";
import socials from "@/_data/socials";
import { Dismiss24Regular, Navigation24Regular } from "@fluentui/react-icons";
import Dismiss24Regular from "@fluentui/svg-icons/icons/dismiss_24_regular.svg";
import Navigation24Regular from "@fluentui/svg-icons/icons/navigation_24_regular.svg";
import React, { useCallback, useEffect, useRef, useState } from "react";
import Button, { ButtonProps } from "./Button";
import NavigationLinks from "./NavigationLinks";