Эх сурвалжийг харах

Removing urban america restriction from GameCreationForm

Kirk Trombley 5 жил өмнө
parent
commit
548a4ded5e

+ 8 - 5
client/src/components/util/GameCreationForm/GameCreationForm.jsx

@@ -17,8 +17,6 @@ export default ({ afterCreate }) => {
     return <Loading />;
   }
 
-  const invalidCombo = genMethod === URBAN && onlyAmerica;
-
   const onCreateGame = async () => {
     setLoading(true);
     const gameId = await createGame(timer, rounds, onlyAmerica, genMethod);
@@ -46,14 +44,19 @@ export default ({ afterCreate }) => {
           <Item value={false}>All Countries</Item>
           <Item value={true}>Just America</Item>
         </Dropdown>
-        <Dropdown selected={`Generator: ${genMethod === MAP_CRUNCH ? 'Map Crunch' : genMethod === RANDOM_STREET_VIEW ? 'RSV' : 'Urban Centers'}`} onSelect={setGenMethod}>
+        <Dropdown
+          selected={`Generator: ${genMethod === MAP_CRUNCH
+            ? 'Map Crunch'
+            : genMethod === RANDOM_STREET_VIEW ? 'RSV' : 'Urban Centers'}`}
+          onSelect={setGenMethod}
+        >
           <Item value={MAP_CRUNCH}>Map Crunch</Item>
           <Item value={RANDOM_STREET_VIEW}>Random Street View</Item>
           <Item value={URBAN}>Urban Centers</Item>
         </Dropdown>
       </div>
-      <button className={styles.start} onClick={onCreateGame} disabled={invalidCombo}>
-        {invalidCombo ? 'Incompatible Options' : 'New Game'}
+      <button className={styles.start} onClick={onCreateGame}>
+        New Game
       </button>
     </div>
   );