mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Build 2 started
This commit is contained in:
18
src/General Scripts/ChangeTitle.js
Normal file
18
src/General Scripts/ChangeTitle.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const ChangeTitle = (language) => {
|
||||
const titleAPP = {
|
||||
english: 'Hangman game',
|
||||
spanish: 'Ahorcado'
|
||||
}
|
||||
|
||||
if (language === 'english') {
|
||||
|
||||
document.title = titleAPP.english
|
||||
}
|
||||
|
||||
if (language === 'spanish') {
|
||||
|
||||
document.title = titleAPP.spanish
|
||||
}
|
||||
}
|
||||
|
||||
export default ChangeTitle
|
||||
Reference in New Issue
Block a user