fix: 抽离update hook

This commit is contained in:
MTrun
2022-03-22 11:41:43 +08:00
parent 75291a9feb
commit 559bf2fe57
7 changed files with 61 additions and 49 deletions
+3 -3
View File
@@ -1,3 +1,3 @@
export * from '@/hooks/theme.hook'
export * from '@/hooks/previewScale.hook'
export * from '@/hooks/code.hook'
export * from '@/hooks/useTheme.hook'
export * from '@/hooks/usePreviewScale.hook'
export * from '@/hooks/useCode.hook'
@@ -2,7 +2,7 @@ import hljs from 'highlight.js/lib/core'
import json from 'highlight.js/lib/languages/json'
import typescript from 'highlight.js/lib/languages/typescript'
export const useHook = () => {
export const useCode = () => {
hljs.registerLanguage('json', json)
hljs.registerLanguage('typescript', typescript)
return hljs