-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timer settings #47
Conversation
* Fixed tailwind class order
* Handle updating values * Add reducer * Handle data in settings modal
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
// import React, { useState } from 'react'; | ||
|
||
// interface PomodoroTimerData { | ||
// minutes: number; | ||
// seconds: number; | ||
// } | ||
|
||
// interface PomodoroTimerSettingsProps { | ||
// onTimerChange: (updatedTimerData: PomodoroTimerData) => void; | ||
// } | ||
|
||
// const PomodoroTimerSettings: React.FC<PomodoroTimerSettingsProps> = ({ onTimerChange }) => { | ||
// const [timerData, setTimerData] = useState<PomodoroTimerData>({ minutes: 25, seconds: 0 }); | ||
|
||
// const handleTimerChange = (callback: (prevSelectedTime: PomodoroTimerData) => Partial<PomodoroTimerData>) => { | ||
// const updatedProperties = callback(timerData); | ||
// setTimerData(prevTimerData => ({ ...prevTimerData, ...updatedProperties })); | ||
// onTimerChange({ ...timerData, ...updatedProperties }); | ||
// }; | ||
|
||
// const handleMinutesChange = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
// const minutes = parseInt(event.target.value, 10) || 0; | ||
// handleTimerChange(prevSelectedTime => ({ minutes })); | ||
// }; | ||
|
||
// const handleSecondsChange = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
// const seconds = parseInt(event.target.value, 10) || 0; | ||
// handleTimerChange(prevSelectedTime => ({ seconds })); | ||
// }; | ||
|
||
// return ( | ||
// <div> | ||
// <label> | ||
// Minutes: | ||
// <input type="number" value={timerData.minutes} onChange={handleMinutesChange} /> | ||
// </label> | ||
// <br /> | ||
// <label> | ||
// Seconds: | ||
// <input type="number" value={timerData.seconds} onChange={handleSecondsChange} /> | ||
// </label> | ||
// </div> | ||
// ); | ||
// }; | ||
|
||
// export default PomodoroTimerSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we needing this anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blue2wo oh nope! I will remove that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌮 🦖
Goal
Related issue: #23
We want users to have the ability to change the length of their designated
pomodoro
,short break
, andlong break
timed sessions. This PR adds a module in the settings menu for doing just that.How to test
Screenshots
mobile:
desktop: