diff --git a/index.html b/index.html index 056788c..c4618bd 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - campaign + وینسو
diff --git a/public/favicon.svg b/public/favicon.svg index 6893eb1..8ad0cbf 100644 --- a/public/favicon.svg +++ b/public/favicon.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/src/components/RequireRole.tsx b/src/components/RequireRole.tsx index 1bae174..ff4fe09 100644 --- a/src/components/RequireRole.tsx +++ b/src/components/RequireRole.tsx @@ -1,9 +1,16 @@ -import { ReactNode } from 'react' +import { ReactNode, useEffect } from 'react' import { Navigate } from 'react-router-dom' import { getUserRole, UserRole } from '../utils/role' export default function RequireRole({ role, children }: { role: UserRole; children: ReactNode }) { const userRole = getUserRole() + + useEffect(() => { + document.title = role === "customer" + ? "پنل رزرو" + : "پنل میزبان"; + }, [role]); + if (userRole !== role) { return }