Skip to content

Commit

Permalink
Added ovulation to calender (#183)
Browse files Browse the repository at this point in the history
* added ovulation to calender

* fixed per comment
  • Loading branch information
puyepuye authored Jan 26, 2025
1 parent b8e44ce commit a6b26ac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tpp-app/src/home/components/Selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import MoodIcon from "../../../assets/icons/mood.svg";
import ExerciseIcon from "../../../assets/icons/exercise.svg";
import CrampsIcon from "../../../assets/icons/cramps.svg";
import SleepIcon from "../../../assets/icons/sleep.svg";
import OvulationIcon from "../../../assets/icons/ovulation.svg";
import { useIsFocused } from "@react-navigation/native";

//write function that takes props & renders the corresponding icon
Expand All @@ -23,6 +24,8 @@ export const SelectedIcon = ({ selectedView, style }) => {
return <MoodIcon style={style} fill="black" />;
case VIEWS.Sleep:
return <SleepIcon style={style} />;
case VIEWS.Ovulation:
return <OvulationIcon style={style} />;
}
};

Expand All @@ -32,6 +35,7 @@ const trackSymptomsToViews = {
[TRACK_SYMPTOMS.FLOW]: VIEWS.Flow,
[TRACK_SYMPTOMS.EXERCISE]: VIEWS.Exercise,
[TRACK_SYMPTOMS.SLEEP]: VIEWS.Sleep,
[TRACK_SYMPTOMS.OVULATION]: VIEWS.Ovulation,
};

const Selector = (props) => {
Expand All @@ -42,6 +46,7 @@ const Selector = (props) => {
let exerciseSelected = props.selectedView === VIEWS.Exercise;
let crampsSelected = props.selectedView === VIEWS.Cramps;
let sleepSelected = props.selectedView === VIEWS.Sleep;
let ovulationSelected = props.selectedView === VIEWS.Ovulation;
let selectedColor = "#B31F20";
let unselectedColor = "#6D6E71";
const isFocused = useIsFocused();
Expand Down Expand Up @@ -108,6 +113,12 @@ const Selector = (props) => {
internalIcon: SleepIcon,
visible: trackedViews[VIEWS.Sleep],
},
{
view: VIEWS.Ovulation,
selected: ovulationSelected,
internalIcon: OvulationIcon,
visible: trackedViews[VIEWS.Ovulation],
},
];

return (
Expand Down

0 comments on commit a6b26ac

Please sign in to comment.