mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-05-03 20:10:19 +00:00
Disable cron, remove some date fns
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m10s
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m10s
This commit is contained in:
parent
42c9dc2162
commit
2663b82789
@ -1,8 +1,8 @@
|
|||||||
name: Build And Publish
|
name: Build And Publish
|
||||||
run-name: ${{ gitea.actor }} runs ci pipeline
|
run-name: ${{ gitea.actor }} runs ci pipeline
|
||||||
on:
|
on:
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '59 23 * * *'
|
# - cron: '59 23 * * *'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
@ -10,7 +10,7 @@ import {Button} from '@/components/ui/Button'
|
|||||||
import {GitHubIcon} from '@/components/icons/SocialIcons'
|
import {GitHubIcon} from '@/components/icons/SocialIcons'
|
||||||
import {ArrowLeftIcon} from '@/components/icons/ArrowLeftIcon'
|
import {ArrowLeftIcon} from '@/components/icons/ArrowLeftIcon'
|
||||||
import {StatusMessage} from '@/components/ui/StatusMessage'
|
import {StatusMessage} from '@/components/ui/StatusMessage'
|
||||||
import {getShortDurationFromNow, truncateDatetime} from '@/lib/dateFns'
|
import {getShortDurationFromNow} from '@/lib/dateFns'
|
||||||
import fetcher from '@/lib/fetcher'
|
import fetcher from '@/lib/fetcher'
|
||||||
import CommentFormProvider, {useCommentFormContext} from '@/app/context/CommentFormProvider'
|
import CommentFormProvider, {useCommentFormContext} from '@/app/context/CommentFormProvider'
|
||||||
import useSWR from 'swr'
|
import useSWR from 'swr'
|
||||||
@ -64,7 +64,7 @@ Comments.Comment = function Comment({comment, isReply = false, className}: {
|
|||||||
<Link href={`https://github.com/${comment.user.username ?? ''}`}>{comment.user.name}</Link>
|
<Link href={`https://github.com/${comment.user.username ?? ''}`}>{comment.user.name}</Link>
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-zinc-500 dark:text-zinc-400">
|
<p className="text-sm text-zinc-500 dark:text-zinc-400">
|
||||||
<time dateTime={truncateDatetime(comment.created_at)}>
|
<time dateTime={comment.created_at}>
|
||||||
<span>· {`${getShortDurationFromNow(comment.created_at)}`}</span>
|
<span>· {`${getShortDurationFromNow(comment.created_at)}`}</span>
|
||||||
</time>
|
</time>
|
||||||
</p>
|
</p>
|
||||||
|
@ -4,9 +4,7 @@ import {
|
|||||||
differenceInMinutes,
|
differenceInMinutes,
|
||||||
differenceInMonths,
|
differenceInMonths,
|
||||||
differenceInWeeks,
|
differenceInWeeks,
|
||||||
differenceInYears,
|
differenceInYears
|
||||||
format,
|
|
||||||
parseISO
|
|
||||||
} from 'date-fns'
|
} from 'date-fns'
|
||||||
|
|
||||||
export function getShortDurationFromNow(fromDateTime: string) {
|
export function getShortDurationFromNow(fromDateTime: string) {
|
||||||
@ -30,7 +28,3 @@ export function getShortDurationFromNow(fromDateTime: string) {
|
|||||||
|
|
||||||
return '<1m'
|
return '<1m'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function truncateDatetime(datetime: string) {
|
|
||||||
return format(parseISO(datetime), 'yyyy-MM-dd\'T\'HH:mm')
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user