From c5d70d7c93bbc8a40e49ddb713ff6278d4605eda Mon Sep 17 00:00:00 2001 From: Stavros Date: Wed, 8 Oct 2025 15:35:54 +0300 Subject: [PATCH] feat: set page title based on configured title --- frontend/src/components/layout/layout.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/layout/layout.tsx b/frontend/src/components/layout/layout.tsx index 3461000..e7780cd 100644 --- a/frontend/src/components/layout/layout.tsx +++ b/frontend/src/components/layout/layout.tsx @@ -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 (