chore: update time in real-time in dashboard and profile sidebar (#3489)
* chore: update dashboard and profile time in realtime * chore: remove seconds * fix: cycle and module sidebar datepicker
This commit is contained in:
parent
b3393f5c48
commit
3c9679dff9
7 changed files with 280 additions and 201 deletions
|
|
@ -1,4 +1,7 @@
|
|||
import { FC } from "react";
|
||||
// hooks
|
||||
import { useCurrentTime } from "hooks/use-current-time";
|
||||
// types
|
||||
import { IUser } from "@plane/types";
|
||||
|
||||
export interface IUserGreetingsView {
|
||||
|
|
@ -7,8 +10,8 @@ export interface IUserGreetingsView {
|
|||
|
||||
export const UserGreetingsView: FC<IUserGreetingsView> = (props) => {
|
||||
const { user } = props;
|
||||
|
||||
const currentTime = new Date();
|
||||
// current time hook
|
||||
const { currentTime } = useCurrentTime();
|
||||
|
||||
const hour = new Intl.DateTimeFormat("en-US", {
|
||||
hour12: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue