diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 56212df..9a67551 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -1,8 +1,8 @@ name: Build And Publish run-name: ${{ gitea.actor }} runs ci pipeline on: - schedule: - - cron: '59 23 * * *' +# schedule: +# - cron: '59 23 * * *' push: branches: - 'main' diff --git a/components/ui/Comments.tsx b/components/ui/Comments.tsx index da9dae5..a8fe8dc 100644 --- a/components/ui/Comments.tsx +++ b/components/ui/Comments.tsx @@ -10,7 +10,7 @@ import {Button} from '@/components/ui/Button' import {GitHubIcon} from '@/components/icons/SocialIcons' import {ArrowLeftIcon} from '@/components/icons/ArrowLeftIcon' import {StatusMessage} from '@/components/ui/StatusMessage' -import {getShortDurationFromNow, truncateDatetime} from '@/lib/dateFns' +import {getShortDurationFromNow} from '@/lib/dateFns' import fetcher from '@/lib/fetcher' import CommentFormProvider, {useCommentFormContext} from '@/app/context/CommentFormProvider' import useSWR from 'swr' @@ -64,7 +64,7 @@ Comments.Comment = function Comment({comment, isReply = false, className}: { {comment.user.name}

-

diff --git a/lib/dateFns.ts b/lib/dateFns.ts index c8e272b..269fb36 100644 --- a/lib/dateFns.ts +++ b/lib/dateFns.ts @@ -4,9 +4,7 @@ import { differenceInMinutes, differenceInMonths, differenceInWeeks, - differenceInYears, - format, - parseISO + differenceInYears } from 'date-fns' export function getShortDurationFromNow(fromDateTime: string) { @@ -29,8 +27,4 @@ export function getShortDurationFromNow(fromDateTime: string) { } return '<1m' -} - -export function truncateDatetime(datetime: string) { - return format(parseISO(datetime), 'yyyy-MM-dd\'T\'HH:mm') -} +} \ No newline at end of file