import React from "react"; import PropTypes from "prop-types"; function QuestTile(props) { return (

{props.quest.name}

Difficulty: {["Low", "Medium", "High"][props.quest.difficulty - 1]}

Priority: {["Low", "Medium", "High"][props.quest.priority - 1]}

State: {props.quest.state ? "Complete": "Incomplete"}

); } QuestTile.propTypes = { quest: PropTypes.object, setDisplay: PropTypes.func, type: PropTypes.string, }; function Quests(props) { const name = { quests: "Quests", sideQuests: "Side Quests" }[props.display.type]; return (

{name}

{props.quests.map((cur) => )}
); } Quests.propTypes = { quests: PropTypes.array, display: PropTypes.object, setDisplay: PropTypes.func, }; export default Quests;