fixed #
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
import marked from 'marked'; | |
import hljs from 'highlight.js'; | |
@Pipe({ | |
name: 'marked' | |
}) | |
export class MarkedPipe implements PipeTransform { | |
marked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'age' | |
}) | |
export class AgePipe implements PipeTransform { | |
transform(value: number, args?: any): any { | |
const ageDate = new Date(Date.now() - value); | |
return Math.abs(ageDate.getUTCFullYear() - 1970); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"validateIndentation": 2, | |
"validateAttributeQuoteMarks": "'", | |
"validateAttributeSeparator": { "separator": " ", "multiLineSeparator": "\n " }, | |
"validateDivTags": true, | |
"requireStrictEqualityOperators": true, | |
"requireSpecificAttributes": [ { "img": [ "alt" ] } ], | |
"requireSpaceAfterCodeOperator": [ "-", "=", "!=" ], | |
"requireLowerCaseTags": true, | |
"requireLowerCaseAttributes": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { differenceInDays, format, formatDistanceToNow } from 'date-fns'; | |
import { ja } from 'date-fns/locale'; | |
export default function RelativeTimestamp({ date }: { date: Date }) { | |
const diffInDays = differenceInDays(new Date(), date); | |
if (diffInDays < 8) { | |
return formatDistanceToNow(date, { | |
locale: ja, | |
addSuffix: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use server'; | |
import { authGuard } from '@/app/actions/auth'; | |
import { db } from '@/app/actions/lib'; | |
import { Prisma } from '@prisma/client'; | |
import { put } from '@vercel/blob'; | |
import { randomUUID } from 'crypto'; | |
import { revalidatePath } from 'next/cache'; | |
import { redirect } from 'next/navigation'; | |
import { cache } from 'react'; |
OlderNewer