Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Event from './components/Event';
import Results from './components/Results';
import startImage from './images/start_screen.png';
import { clearChoicesRecord, recordBadge } from "./utils/utils";
import {incrementOutcomeTally} from "./db/firestore";

const endInfo = {
'highDensityHighInfrastructure': {
Expand Down Expand Up @@ -93,13 +94,17 @@ function App() {
const getEnding = () => {
let data = {}
if (densityScore >= 4 && infrastructureScore >= 1) {
data = endInfo['highDensityHighInfrastructure']
data = endInfo['highDensityHighInfrastructure'];
incrementOutcomeTally('high-density-high-infrastructure');
} else if (densityScore >= 4) {
data = endInfo['highDensityLowInfrastructure']
data = endInfo['highDensityLowInfrastructure'];
incrementOutcomeTally('high-density-low-infrastructure');
} else if (infrastructureScore >= 1) {
data = endInfo['lowDensityHighInfrastructure']
data = endInfo['lowDensityHighInfrastructure'];
incrementOutcomeTally('low-density-high-infrastructure');
} else {
data = endInfo['lowDensityLowInfrastructure']
data = endInfo['lowDensityLowInfrastructure'];
incrementOutcomeTally('low-density-low-infrastructure');
}

recordBadge(data.badge)
Expand Down