RecentComment 异步加载调整

This commit is contained in:
tangly1024
2022-12-10 15:57:30 +08:00
parent b0120bfd8f
commit 7e477b79ba
6 changed files with 9 additions and 12 deletions

View File

@@ -1,9 +1,7 @@
import React from 'react'
import BLOG from '@/blog.config'
import Link from 'next/link'
import dynamic from 'next/dynamic'
const { RecentComments } = dynamic(() => import('@waline/client'))
import { RecentComments } from '@waline/client'
/**
* @see https://waline.js.org/guide/get-started.html

View File

@@ -2,7 +2,8 @@ import BLOG from '@/blog.config'
import Live2D from '@/components/Live2D'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import ExampleRecentComments from './ExampleRecentComments'
import dynamic from 'next/dynamic'
const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments'))
export const SideBar = (props) => {
const { locale } = useGlobal()

View File

@@ -3,9 +3,7 @@ import BLOG from '@/blog.config'
import Card from '@/themes/hexo/components/Card'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import dynamic from 'next/dynamic'
const { RecentComments } = dynamic(() => import('@waline/client'))
import { RecentComments } from '@waline/client'
/**
* @see https://waline.js.org/guide/get-started.html

View File

@@ -6,9 +6,10 @@ import Catalog from './Catalog'
import { InfoCard } from './InfoCard'
import { AnalyticsCard } from './AnalyticsCard'
import CONFIG_HEXO from '../config_hexo'
import HexoRecentComments from './HexoRecentComments'
import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
const HexoRecentComments = dynamic(() => import('./HexoRecentComments'))
/**
* Hexo主题右侧栏
* @param {*} props

View File

@@ -1,9 +1,7 @@
import React from 'react'
import BLOG from '@/blog.config'
import Link from 'next/link'
import dynamic from 'next/dynamic'
const { RecentComments } = dynamic(() => import('@waline/client'))
import { RecentComments } from '@waline/client'
/**
* @see https://waline.js.org/guide/get-started.html

View File

@@ -6,8 +6,9 @@ import CategoryGroup from './CategoryGroup'
import TagGroups from './TagGroups'
import CONFIG_NEXT from '../config_next'
import { useRouter } from 'next/router'
import NextRecentComments from './NextRecentComments'
import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
const NextRecentComments = dynamic(() => import('./NextRecentComments'))
/**
* 侧边平铺