diff --git a/frontend/src/components/Scratch/ScratchToolbar.tsx b/frontend/src/components/Scratch/ScratchToolbar.tsx index e5d0603d..ab080ad5 100644 --- a/frontend/src/components/Scratch/ScratchToolbar.tsx +++ b/frontend/src/components/Scratch/ScratchToolbar.tsx @@ -6,12 +6,11 @@ import { DownloadIcon, FileIcon, IterationsIcon, RepoForkedIcon, SyncIcon, Trash import classNames from "classnames" import ContentEditable from "react-contenteditable" +import TimeAgo2 from "@/components/TimeAgo2" import * as api from "@/lib/api" import { scratchUrl } from "@/lib/api/urls" import { useSize } from "@/lib/hooks" -import TimeAgo2 from "@/components/TimeAgo2" - import Breadcrumbs from "../Breadcrumbs" import Nav from "../Nav" import PlatformLink from "../PlatformLink" diff --git a/frontend/src/components/Scratch/panels/AboutPanel.tsx b/frontend/src/components/Scratch/panels/AboutPanel.tsx index 42d0c224..39fee502 100644 --- a/frontend/src/components/Scratch/panels/AboutPanel.tsx +++ b/frontend/src/components/Scratch/panels/AboutPanel.tsx @@ -6,9 +6,8 @@ import LoadingSpinner from "@/components/loading.svg" import { PlatformIcon } from "@/components/PlatformSelect/PlatformIcon" import PlatformName from "@/components/PlatformSelect/PlatformName" import { getScoreText } from "@/components/ScoreBadge" -import UserLink from "@/components/user/UserLink" import TimeAgo2 from "@/components/TimeAgo2" - +import UserLink from "@/components/user/UserLink" import { Scratch, Preset, get, usePreset } from "@/lib/api" import { presetUrl, scratchUrl, scratchParentUrl } from "@/lib/api/urls" diff --git a/frontend/src/components/ScratchList.tsx b/frontend/src/components/ScratchList.tsx index e62d62d7..4cd8035b 100644 --- a/frontend/src/components/ScratchList.tsx +++ b/frontend/src/components/ScratchList.tsx @@ -6,6 +6,7 @@ import Link from "next/link" import classNames from "classnames" +import TimeAgo2 from "@/components/TimeAgo2" import * as api from "@/lib/api" import { presetUrl, scratchUrl } from "@/lib/api/urls" import useTranslation from "@/lib/i18n/translate" @@ -18,7 +19,6 @@ import { calculateScorePercent, percentToString } from "./ScoreBadge" import styles from "./ScratchList.module.scss" import Sort, { SortMode } from "./Sort" import UserLink from "./user/UserLink" -import TimeAgo2 from "../components/TimeAgo2" export interface Props { title?: string diff --git a/frontend/src/components/TimeAgo2.tsx b/frontend/src/components/TimeAgo2.tsx index 6348c3cd..bd069e53 100644 --- a/frontend/src/components/TimeAgo2.tsx +++ b/frontend/src/components/TimeAgo2.tsx @@ -8,7 +8,7 @@ function formatDateString(x: string, format="YYYY-MM-DD HH:mm:ss") { } export default function TimeAgo2({ - date + date, }: { date: string }) { @@ -17,5 +17,5 @@ export default function TimeAgo2({ return + /> }