diff --git a/src/App.js b/src/App.js index e7114fa..5f56d3b 100644 --- a/src/App.js +++ b/src/App.js @@ -25,7 +25,7 @@ function App() { const [selectedRoom, setSelectedRoom] = useState(); const [numAdults, setNumAdults] = useState(); - const [rent, setRent] = useState(); + const [rent, setRent] = useState(0); const [flatRent, setFlatRent] = useState(); const theme = extendTheme({ diff --git a/src/Solimieten.js b/src/Solimieten.js index 3108d4a..101d45c 100644 --- a/src/Solimieten.js +++ b/src/Solimieten.js @@ -220,7 +220,7 @@ export function SelfEvaluationCard({ rent, setRent }) { const [sliderValue, setSliderValue] = useState(30) const [showTooltip, setShowTooltip] = useState(false) - const [income, setIncome] = useState(1000) + const [income, setIncome] = useState(0) const formatEuro = (val) => val + ' €'; const parseEuro = (val) => val.replace(/^€/, '') @@ -299,8 +299,7 @@ export function ResultsCard({ rent, flat, room, numAdults, flatRent }) { var body = if (flat && (room || flat.wgRoomList.length === 0) && flatRent) { var totalSize = flat.calcTotalPayedArea(room) - var kitchenCost = flat.wgRoomList.length > 0 ? 50 / flat.wgRoomList.length : 50; - var relativeRent = (rent - kitchenCost - (60 * numAdults)) / totalSize; + var relativeRent = (rent) / totalSize; var rangePosition = ((rent - flatRent.min) / (flatRent.maxCovering - flatRent.min)) * 100; if (rangePosition < 0) { rangePosition = 0; }