mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 15:10:11 +00:00
部分公共组件配置化
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
import React, { createRef } from 'react'
|
||||
import { init } from '@waline/client'
|
||||
import BLOG from '@/blog.config'
|
||||
import { useRouter } from 'next/router'
|
||||
import '@waline/client/dist/waline.css'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
const path = ''
|
||||
let waline = null
|
||||
@@ -12,7 +12,7 @@ let waline = null
|
||||
* @returns
|
||||
*/
|
||||
const WalineComponent = (props) => {
|
||||
const containerRef = React.createRef()
|
||||
const containerRef = createRef()
|
||||
const router = useRouter()
|
||||
|
||||
const updateWaline = url => {
|
||||
@@ -26,8 +26,8 @@ const WalineComponent = (props) => {
|
||||
waline = init({
|
||||
...props,
|
||||
el: containerRef.current,
|
||||
serverURL: BLOG.COMMENT_WALINE_SERVER_URL,
|
||||
lang: BLOG.lang,
|
||||
serverURL: siteConfig('COMMENT_WALINE_SERVER_URL'),
|
||||
lang: siteConfig('LANG'),
|
||||
reaction: true,
|
||||
dark: 'html.dark',
|
||||
emoji: [
|
||||
|
||||
Reference in New Issue
Block a user