Fix ESLint errors in dev title prefix
All checks were successful
Build & Deploy OS League Tools / build-and-deploy (push) Successful in 54s

This commit is contained in:
2026-01-17 01:14:24 +00:00
parent d00cc3225c
commit d7297346f2

View File

@@ -41,11 +41,10 @@ history.listen(() => {
} }
}); });
const isDevEnvironment = () => { const isDevEnvironment = () =>
return window.location.hostname.startsWith('dev.') || window.location.hostname.startsWith('dev.') ||
window.location.hostname === 'localhost' || window.location.hostname === 'localhost' ||
window.location.port === '3001'; window.location.port === '3001';
};
export default function App() { export default function App() {
useEffect(() => { useEffect(() => {
@@ -60,11 +59,13 @@ export default function App() {
// Prefix title with [DEV] on dev environment // Prefix title with [DEV] on dev environment
useEffect(() => { useEffect(() => {
if (!isDevEnvironment()) return; if (!isDevEnvironment()) {
return undefined;
}
const prefixTitle = () => { const prefixTitle = () => {
if (!document.title.startsWith('[DEV] ')) { if (!document.title.startsWith('[DEV] ')) {
document.title = '[DEV] ' + document.title; document.title = `[DEV] ${document.title}`;
} }
}; };