File tree Expand file tree Collapse file tree 12 files changed +7139
-173
lines changed
20240807101452_published_at_non_optional Expand file tree Collapse file tree 12 files changed +7139
-173
lines changed Original file line number Diff line number Diff line change 3
3
# warning: variables prefixed with NEXT_PUBLIC_ will be made available to client-side code
4
4
# be careful not to expose sensitive data
5
5
6
- DATABASE_URL = postgresql ://postgres:postgres @localhost:5432 /changelog
6
+ DATABASE_URL = postgres ://postgres:BSd1sa244r5CI7S @localhost/changelog?host=34.70.239.3
7
7
NEXTAUTH_URL = http://localhost:3000
8
8
NEXTAUTH_SECRET = secret
Original file line number Diff line number Diff line change 27
27
"next-auth" : " ^4.24.5" ,
28
28
"next-mdx-remote" : " ^4.4.1" ,
29
29
"nextjs-toploader" : " ^1.6.6" ,
30
+ "nuqs" : " ^1.17.7" ,
30
31
"prism-sentry" : " ^1.0.2" ,
31
32
"react" : " beta" ,
32
33
"react-dom" : " beta" ,
Original file line number Diff line number Diff line change
1
+ /*
2
+ Warnings:
3
+
4
+ - Made the column `publishedAt` on table `Changelog` required. This step will fail if there are existing NULL values in that column.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE " Changelog" ALTER COLUMN " publishedAt" SET NOT NULL ;
Original file line number Diff line number Diff line change
1
+ # Please do not edit this file manually
2
+ # It should be added in your version-control system (i.e. Git)
3
+ provider = " postgresql"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ generator client {
5
5
6
6
datasource db {
7
7
provider = " postgresql "
8
- url = env ( " DATABASE_URL " )
8
+ url = " postgres://postgres:BSd1sa244r5CI7S@localhost/changelog?host=34.70.239.3 "
9
9
}
10
10
11
11
model Account {
@@ -58,7 +58,7 @@ model VerificationToken {
58
58
model Changelog {
59
59
id String @id @default (cuid () )
60
60
createdAt DateTime @default (now () )
61
- publishedAt DateTime ? @default (now () )
61
+ publishedAt DateTime @default (now () )
62
62
updatedAt DateTime @updatedAt
63
63
title String @db.VarChar (255 )
64
64
slug String @unique @db.VarChar (255 )
Original file line number Diff line number Diff line change @@ -103,10 +103,11 @@ export default async function ChangelogsListPage() {
103
103
< span className = "text-gray-500" >
104
104
< Text size = "1" >
105
105
{ ' ' }
106
- { new Date ( changelog . publishedAt || '' ) . toLocaleDateString (
107
- undefined ,
108
- { month : 'long' , day : 'numeric' }
109
- ) }
106
+ { new Date ( changelog . publishedAt || '' ) . toLocaleDateString ( 'en-EN' , {
107
+ month : 'long' ,
108
+ day : 'numeric' ,
109
+ timeZone : 'UTC' ,
110
+ } ) }
110
111
</ Text >
111
112
< br />
112
113
</ span >
Original file line number Diff line number Diff line change 1
1
import { ReactNode } from 'react' ;
2
- import Tag from './tag ' ;
3
- import { DateComponent } from './date ' ;
2
+ import { DateComponent } from './date ' ;
3
+ import { CategoryTag } from './tag ' ;
4
4
5
5
type ArticleProps = {
6
6
children ?: ReactNode ;
@@ -41,7 +41,7 @@ export default function Article({
41
41
< h3 className = "text-3xl text-primary font-semibold mb-2" > { title } </ h3 >
42
42
< div >
43
43
< div className = "flex flex-wrap gap-1 py-1" >
44
- { Array . isArray ( tags ) && tags . map ( tag => < Tag key = { tag } text = { tag } /> ) }
44
+ { Array . isArray ( tags ) && tags . map ( tag => < CategoryTag key = { tag } text = { tag } /> ) }
45
45
</ div >
46
46
47
47
< div className = "prose max-w-none text-gray-700 py-2" > { children } </ div >
Original file line number Diff line number Diff line change 1
1
const formatDate = ( date : string | Date ) => {
2
- const options : Intl . DateTimeFormatOptions = {
2
+ const now = new Date ( date ) . toLocaleDateString ( 'en-EN' , {
3
3
year : 'numeric' ,
4
4
month : 'long' ,
5
5
day : 'numeric' ,
6
6
timeZone : 'UTC'
7
- } ;
8
- const now = new Date ( date ) . toLocaleDateString ( 'en-EN' , options ) ;
7
+ } ) ;
9
8
10
9
return now ;
11
10
} ;
You can’t perform that action at this time.
0 commit comments