mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-14 20:54:30 +08:00
fix(share): The language of the shared page will cause the language of the original website to change. (#18043)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Toaster as Sonner } from '@/components/ui/sonner';
|
||||
import { Toaster } from '@/components/ui/toaster';
|
||||
import { changeLanguageAsync } from '@/locales/config';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { configResponsive } from 'ahooks';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -13,13 +12,12 @@ import localeData from 'dayjs/plugin/localeData';
|
||||
import weekOfYear from 'dayjs/plugin/weekOfYear';
|
||||
import weekYear from 'dayjs/plugin/weekYear';
|
||||
import weekday from 'dayjs/plugin/weekday';
|
||||
import React, { useEffect } from 'react';
|
||||
import React from 'react';
|
||||
import { RouterProvider } from 'react-router';
|
||||
import { ThemeProvider } from './components/theme-provider';
|
||||
import { TooltipProvider } from './components/ui/tooltip';
|
||||
import { ThemeEnum } from './constants/common';
|
||||
import { routers } from './routes';
|
||||
import storage from './utils/authorization-util';
|
||||
|
||||
import 'react-photo-view/dist/react-photo-view.css';
|
||||
|
||||
@@ -76,13 +74,6 @@ function Root({ children }: React.PropsWithChildren) {
|
||||
}
|
||||
|
||||
const RootProvider = ({ children }: React.PropsWithChildren) => {
|
||||
useEffect(() => {
|
||||
const lng = storage.getLanguage();
|
||||
if (lng) {
|
||||
void changeLanguageAsync(lng);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
|
||||
Reference in New Issue
Block a user