feat: set page title based on configured title

This commit is contained in:
Stavros
2025-10-08 15:35:54 +03:00
parent adffb4ac0a
commit c5d70d7c93

View File

@@ -1,11 +1,17 @@
import { useAppContext } from "@/context/app-context";
import { LanguageSelector } from "../language/language";
import { Outlet } from "react-router";
import { useCallback, useState } from "react";
import { useCallback, useEffect, useState } from "react";
import { DomainWarning } from "../domain-warning/domain-warning";
const BaseLayout = ({ children }: { children: React.ReactNode }) => {
const { backgroundImage } = useAppContext();
const { backgroundImage, title } = useAppContext();
useEffect(() => {
if (title !== "Tinyauth") {
document.title = title + " - Tinyauth";
}
}, [title]);
return (
<div