File tree Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 5
5
/.pnp
6
6
.pnp.js
7
7
yarn.lock
8
+ pnpm-lock.yaml
8
9
.yarn /cache
9
10
bun.lockb
10
11
.yarn /install-state.gz
Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 0.2.0" ,
3
+ "configurations" : [
4
+ {
5
+ "name" : " Next.js: debug server-side" ,
6
+ "type" : " node-terminal" ,
7
+ "request" : " launch" ,
8
+ "command" : " npm run dev" ,
9
+ "skipFiles" : [" <node_internals>/**" ],
10
+ "serverReadyAction" : {
11
+ "pattern" : " started server on .+, url: (https?://.+)" ,
12
+ "uriFormat" : " %s" ,
13
+ "action" : " openExternally"
14
+ }
15
+ },
16
+ {
17
+ "name" : " Next.js: debug client-side" ,
18
+ "type" : " chrome" ,
19
+ "request" : " launch" ,
20
+ "url" : " http://localhost:3000" ,
21
+ "webRoot" : " ${workspaceFolder}"
22
+ },
23
+ {
24
+ "name" : " Next.js: debug full stack" ,
25
+ "type" : " node-terminal" ,
26
+ "request" : " launch" ,
27
+ "command" : " npm run dev" ,
28
+ "serverReadyAction" : {
29
+ "pattern" : " started server on .+, url: (https?://.+)" ,
30
+ "uriFormat" : " %s" ,
31
+ "action" : " debugWithChrome"
32
+ }
33
+ }
34
+ ]
35
+ }
Original file line number Diff line number Diff line change 2
2
3
3
import * as articleActions from "@/backend/services/article.actions" ;
4
4
import ArticleCard from "@/components/ArticleCard" ;
5
+ import VisibilitySensor from "@/components/VisibilitySensor" ;
5
6
import { readingTime } from "@/lib/utils" ;
6
7
import getFileUrl from "@/utils/getFileUrl" ;
7
8
import { useInfiniteQuery } from "@tanstack/react-query" ;
8
- import VisibilitySensor from "@/components/VisibilitySensor" ;
9
9
10
10
const ArticleFeed = ( ) => {
11
11
const feedInfiniteQuery = useInfiniteQuery ( {
@@ -14,6 +14,7 @@ const ArticleFeed = () => {
14
14
articleActions . articleFeed ( { limit : 5 , page : pageParam } ) ,
15
15
initialPageParam : 1 ,
16
16
getNextPageParam : ( lastPage ) => {
17
+ if ( ! lastPage ?. meta . hasNextPage ) return undefined ;
17
18
const _page = lastPage ?. meta ?. currentPage ?? 1 ;
18
19
return _page + 1 ;
19
20
} ,
Original file line number Diff line number Diff line change 1
1
"use server" ;
2
2
3
- import { generateRandomString , removeMarkdownSyntax } from "@/lib/utils" ;
3
+ import { slugify } from "@/lib/slug-helper.util" ;
4
+ import { removeMarkdownSyntax } from "@/lib/utils" ;
4
5
import { z } from "zod" ;
5
6
import { Article , User } from "../models/domain-models" ;
6
7
import { pgClient } from "../persistence/database-drivers/pg.client" ;
@@ -18,7 +19,6 @@ import {
18
19
} from "./RepositoryException" ;
19
20
import { ArticleRepositoryInput } from "./inputs/article.input" ;
20
21
import { getSessionUserId } from "./session.actions" ;
21
- import { slugify } from "@/lib/slug-helper.util" ;
22
22
23
23
const articleRepository = new PersistentRepository < Article > (
24
24
"articles" ,
You can’t perform that action at this time.
0 commit comments