diff --git a/firebase.json b/firebase.json index bb65dde..46763f5 100644 --- a/firebase.json +++ b/firebase.json @@ -28,6 +28,7 @@ "port": 9099 }, "firestore": { + "port": 8080 } } } diff --git a/src/components/goals/MoreInfo.tsx b/src/components/goals/MoreInfo.tsx new file mode 100644 index 0000000..4622333 --- /dev/null +++ b/src/components/goals/MoreInfo.tsx @@ -0,0 +1,41 @@ +import {Modal } from "react-bootstrap"; + +export function MoreInfo({ show, closeModal }: { show: boolean, closeModal: () => void }) { + + return closeModal()}> + + + About the 50/30/20 Principle + + + +
What is the 50/30/20 Principle?
+

+ Simply put, it is an intuitive and straightforward budget rule that can help you draw up a reasonable budget + you can stick to over time in order to meet your financial goals.
+ The rule is to split your after-tax income into three categories of spending: 50% on needs, 30% on wants, and 20% on savings. +

+
Adaptable by Nature.
+

+ Of course, everyone’s situation is different and the 50/30/20 split may not work for you. If you feel like saving 20% is not realistic, + you could try and adjust the percentages and aim to save a smaller amount — 10% or 5% each month, for example. +

+ +
Benefits:
+ +
+ + + + +
+} \ No newline at end of file diff --git a/src/pages/dashboard/goal setting tile/GoalSettingTile.tsx b/src/pages/dashboard/goal setting tile/GoalSettingTile.tsx index 31f445d..ae3e972 100644 --- a/src/pages/dashboard/goal setting tile/GoalSettingTile.tsx +++ b/src/pages/dashboard/goal setting tile/GoalSettingTile.tsx @@ -3,7 +3,9 @@ import {setUserPrefs, UserPrefs} from "../../../utils/user_prefs.ts"; import MultiRangeSlider, {ChangeResult} from "multi-range-slider-react"; import "./GoalsSettingTile.scss"; import {auth} from "../../../utils/firebase.ts"; -import { stopDragging } from "../../../components/transactions/CSVUpload.tsx"; +import {stopDragging} from "../../../components/transactions/CSVUpload.tsx"; + +import {MoreInfo} from "../../../components/goals/MoreInfo.tsx"; export default function goalSettingTile(userPrefs: UserPrefs, forceUpdate: () => void): ReactNode { const [minValue, setMinValue] = useState( @@ -28,10 +30,28 @@ export default function goalSettingTile(userPrefs: UserPrefs, forceUpdate: () => setMaxValue(max); }; + const [showInfoModal, setShowInfoModal] = useState(false); + function closeModal(setShow: React.Dispatch>) { + setShow(false); + } + const onInfoModalClose = () => closeModal(setShowInfoModal) + return <> -
+ +
Goals + +
+ +
+
+