Skip to content
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

Timer Page Implimentation #1652

Merged
merged 24 commits into from
Aug 5, 2024
Merged

Timer Page Implimentation #1652

merged 24 commits into from
Aug 5, 2024

Conversation

nidheesh-m-vakharia
Copy link
Collaborator

No description provided.

@@ -0,0 +1,23 @@
const TimerStatus = ({ isComplete, paused }) => {
if (isComplete) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are already built status components, that should be enough for this?

setInvalid(true);
};

const numberToDate = (num) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if num is of type Date, then u dont need to the substr, there are getHours, getMinutes, and getSeconds that you can use

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried doing that but apparently we cant separtte the hours minutes and seconds, it all just comes off as one number

import Tooltip from "./Tooltip";

const TimerControls = ({
isEditMode,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surely we do not need these many props for each one 😭 is it possible we can reduce this list

import EditMode from "./EditMode";
import { Progress } from "@/components/ui/progress";
import { ChevronDown, ChevronUp } from "lucide-react";
import { toast } from "react-hot-toast";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should call the custom toaster

return;
}

if (paused) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine with upper if check

@shahdivyank shahdivyank linked an issue Aug 1, 2024 that may be closed by this pull request
@shahdivyank shahdivyank merged commit 1e2e434 into dev Aug 5, 2024
6 checks passed
@shahdivyank shahdivyank deleted the nidheesh-m-vakharia/timer-page branch August 5, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Develop Timer Page
5 participants