Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ViggoZ/hackernews-cn
/ functions
Functions
38 in github.com/ViggoZ/hackernews-cn
⨍
Functions
38
◇
Types & classes
12
↓ 5 callers
Function
withRetry
(operation: () => Promise<T>, maxRetries = 5)
src/lib/db.ts:22
↓ 3 callers
Function
cn
(...inputs: ClassValue[])
src/lib/utils.ts:4
↓ 3 callers
Function
translateText
(text: string)
src/lib/translate.ts:8
↓ 2 callers
Function
createStory
(item: HNItem, translation: { titleZh: string; textZh?: string })
src/lib/db.ts:47
↓ 2 callers
Function
fetchItem
(id: number)
src/lib/hn.ts:62
↓ 2 callers
Function
fetchMultipleStories
(ids: number[])
src/lib/hn.ts:67
↓ 2 callers
Function
fetchStories
(type: string)
src/lib/hn.ts:56
↓ 2 callers
Function
fetchWithRetry
(url: string, retries = MAX_RETRIES)
src/lib/hn.ts:40
↓ 2 callers
Function
storyExists
(id: number)
src/lib/db.ts:204
↓ 2 callers
Function
translateStory
(story: HNItem)
src/lib/translate.ts:32
↓ 1 callers
Function
getStories
( type: StoryType = 'top', page: number = 1, pageSize: number = 20 )
src/lib/db.ts:128
↓ 1 callers
Function
getStoriesByTypes
(types: StoryType[], pageSize: number = 10)
src/lib/db.ts:76
↓ 1 callers
Function
getStory
(id: number)
src/lib/db.ts:196
↓ 1 callers
Function
handleScroll
()
src/app/components/ScrollDetector.tsx:7
↓ 1 callers
Function
isValidCronRequest
(request: Request)
src/app/api/cron/route.ts:16
↓ 1 callers
Function
isValidStoryType
(type: string)
src/app/category/[type]/page.tsx:30
↓ 1 callers
Function
mapHNTypeToDBType
(hnType: string)
src/app/api/cron/route.ts:25
↓ 1 callers
Function
prismaClientSingleton
()
src/lib/db.ts:9
↓ 1 callers
Function
processStory
(story: HNItem, type: string)
src/app/api/cron/route.ts:44
Function
CategoryPage
({ params, searchParams, }: { params: { type: string }; searchParams: { page?: string }; })
src/app/category/[type]/page.tsx:34
Function
FAQ
()
src/components/home/FAQ.tsx:25
Function
Features
()
src/components/home/Features.tsx:26
Function
Footer
()
src/components/layout/footer.tsx:5
Function
GET
()
src/app/api/fetch/route.ts:12
Function
GET
(req: Request)
src/app/api/cron/route.ts:74
Function
GET
(request: Request)
src/app/api/debug/route.ts:4
Function
Header
()
src/components/layout/header.tsx:8
Function
Home
()
src/app/page.tsx:119
Function
RootLayout
({ children, }: { children: React.ReactNode })
src/app/layout.tsx:13
Function
ScrollDetector
()
src/app/components/ScrollDetector.tsx:5
Function
StoryCard
({ title, type, stories, icon }: StoryCardProps)
src/app/page.tsx:41
Function
StoryList
({ stories, type, currentPage }: StoryListProps)
src/components/StoryList.tsx:24
Function
StoryPage
({ params }: PageProps)
src/app/item/[id]/page.tsx:28
Function
batchTranslate
( items: T[], translateFn: (item: T) => Promise<R>, delayMs: number = 1000 )
src/lib/translate.ts:48
Function
fetchComments
(ids: number[])
src/lib/hn.ts:79
Function
fetchUser
(id: string)
src/lib/hn.ts:74
Function
handleScroll
()
src/components/layout/header.tsx:12
Function
translateComment
(comment: HNItem)
src/lib/translate.ts:42