]> git.localhorst.tv Git - alttp.git/commitdiff
add title to doors tracker
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 25 Jun 2023 11:20:12 +0000 (13:20 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 25 Jun 2023 11:20:12 +0000 (13:20 +0200)
resources/js/components/pages/DoorsTracker.js

index a6c6acefac93032d00c22c79e9c0ab7310a0bf50..ae96530740170d53ecca35f6d0d6b522d223299b 100644 (file)
@@ -1,4 +1,5 @@
 import React from 'react';
+import { Helmet } from 'react-helmet';
 
 import ZeldaIcon from '../common/ZeldaIcon';
 
@@ -98,36 +99,42 @@ const DoorsTracker = () => {
                e.stopPropagation();
        });
 
-       return <div className="doors-tracker d-flex flex-column">
-               {DUNGEONS.map(dungeon =>
-                       <div className="d-flex flex-row" key={dungeon}>
-                               <div
-                                       className={`cell ${state[dungeon].boss ? 'on' : 'off'} dungeon`}
-                                       onClick={handleItemClick(dungeon, 'boss')}
-                               >
-                                       <ZeldaIcon name={`dungeon-${dungeon}`} />
-                               </div>
-                               <div
-                                       className={`cell ${state[dungeon].keys ? 'on' : 'off'} keys`}
-                                       onClick={handleKeysClick(dungeon)}
-                                       onContextMenu={handleKeysRightClick(dungeon)}
-                               >
-                                       {state[dungeon].keys}
-                               </div>
-                               {ITEMS.map(item =>
+       return <>
+               <Helmet>
+                       <title>Doors Tracker</title>
+                       <meta name="description" content="Doors Tracker" />
+               </Helmet>
+               <div className="doors-tracker d-flex flex-column">
+                       {DUNGEONS.map(dungeon =>
+                               <div className="d-flex flex-row" key={dungeon}>
+                                       <div
+                                               className={`cell ${state[dungeon].boss ? 'on' : 'off'} dungeon`}
+                                               onClick={handleItemClick(dungeon, 'boss')}
+                                       >
+                                               <ZeldaIcon name={`dungeon-${dungeon}`} />
+                                       </div>
                                        <div
-                                               className={
-                                                       `cell ${state[dungeon][item] ? 'on' : 'off'} ${ITEM_CLASSES[item]}`
-                                               }
-                                               key={item}
-                                               onClick={handleItemClick(dungeon, item)}
+                                               className={`cell ${state[dungeon].keys ? 'on' : 'off'} keys`}
+                                               onClick={handleKeysClick(dungeon)}
+                                               onContextMenu={handleKeysRightClick(dungeon)}
                                        >
-                                               <ZeldaIcon name={item} />
+                                               {state[dungeon].keys}
                                        </div>
-                               )}
-                       </div>
-               )}
-       </div>;
+                                       {ITEMS.map(item =>
+                                               <div
+                                                       className={
+                                                               `cell ${state[dungeon][item] ? 'on' : 'off'} ${ITEM_CLASSES[item]}`
+                                                       }
+                                                       key={item}
+                                                       onClick={handleItemClick(dungeon, item)}
+                                               >
+                                                       <ZeldaIcon name={item} />
+                                               </div>
+                                       )}
+                               </div>
+                       )}
+               </div>
+       </>;
 };
 
 export default DoorsTracker;