mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
fix build fukasawa
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { deepClone } from '@/lib/utils'
|
||||
import { deepClone, isBrowser } from '@/lib/utils'
|
||||
import BlogCard from './BlogCard'
|
||||
import BlogPostListEmpty from './BlogListEmpty'
|
||||
import PaginationSimple from './PaginationSimple'
|
||||
@@ -65,13 +65,21 @@ const BlogListPage = ({ page = 1, posts = [], postCount, siteInfo }) => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算文章列数
|
||||
* @returns
|
||||
*/
|
||||
const calculateColumns = () => {
|
||||
if (window.innerWidth >= 1024) {
|
||||
if (!isBrowser()) {
|
||||
return 3
|
||||
} else if (window.innerWidth >= 640) {
|
||||
return 2
|
||||
} else {
|
||||
return 1
|
||||
if (window.innerWidth >= 1024) {
|
||||
return 3
|
||||
} else if (window.innerWidth >= 640) {
|
||||
return 2
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user