mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix @node-rs/jieba and window not found (#1313)
* dynamic import * perf: entry * fix: jieba package
This commit is contained in:
@@ -2,9 +2,9 @@ import { useTranslation } from 'next-i18next';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export const useBeforeunload = (props?: { callback?: () => any; tip?: string }) => {
|
||||
const { t } = useTranslation('common');
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { tip = t('Confirm to leave the page'), callback } = props || {};
|
||||
const { tip = t('common.Confirm to leave the page'), callback } = props || {};
|
||||
|
||||
useEffect(() => {
|
||||
const listen =
|
||||
|
Reference in New Issue
Block a user