mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 07:26:45 +00:00
fix nobelium build
This commit is contained in:
@@ -3,6 +3,7 @@ import { useGlobal } from '@/lib/global'
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import throttle from 'lodash.throttle'
|
import throttle from 'lodash.throttle'
|
||||||
|
import { deepClone } from '@/lib/utils'
|
||||||
|
|
||||||
export const BlogListScroll = props => {
|
export const BlogListScroll = props => {
|
||||||
const { posts } = props
|
const { posts } = props
|
||||||
@@ -11,8 +12,8 @@ export const BlogListScroll = props => {
|
|||||||
const [page, updatePage] = React.useState(1)
|
const [page, updatePage] = React.useState(1)
|
||||||
|
|
||||||
let hasMore = false
|
let hasMore = false
|
||||||
const postsToShow = posts
|
const postsToShow = posts && Array.isArray(posts)
|
||||||
? Object.assign(posts).slice(0, BLOG.POSTS_PER_PAGE * page)
|
? deepClone(posts).slice(0, BLOG.POSTS_PER_PAGE * page)
|
||||||
: []
|
: []
|
||||||
|
|
||||||
if (posts) {
|
if (posts) {
|
||||||
|
|||||||
Reference in New Issue
Block a user