diff options
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelineItem.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelineItem.tsx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx b/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx index 74431402..c096f890 100644 --- a/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx +++ b/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx @@ -1,7 +1,6 @@ import React from "react"; import clsx from "clsx"; import { Link } from "react-router-dom"; -import { useTranslation } from "react-i18next"; import { useAvatar } from "@/services/user"; import { TimelinePostInfo } from "@/services/timeline"; @@ -24,8 +23,6 @@ export interface TimelineItemProps { } const TimelineItem: React.FC<TimelineItemProps> = (props) => { - const { i18n } = useTranslation(); - const current = props.current === true; const { more } = props; @@ -42,6 +39,15 @@ const TimelineItem: React.FC<TimelineItemProps> = (props) => { > <TimelineLine center="node" current={current} /> <div className="timeline-item-card"> + {more != null ? ( + <i + className="bi-chevron-down text-info icon-button float-right" + onClick={(e) => { + more.toggle(); + e.stopPropagation(); + }} + /> + ) : null} <div className="timeline-item-header"> <span className="mr-2"> <span> @@ -52,19 +58,10 @@ const TimelineItem: React.FC<TimelineItemProps> = (props) => { {props.post.author.nickname} </small> <small className="text-secondary white-space-no-wrap"> - {props.post.time.toLocaleString(i18n.languages)} + {props.post.time.toLocaleTimeString()} </small> </span> </span> - {more != null ? ( - <i - className="bi-chevron-down text-info icon-button" - onClick={(e) => { - more.toggle(); - e.stopPropagation(); - }} - /> - ) : null} </div> <div className="timeline-content"> {(() => { |