mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-03-19 13:47:43 +08:00
Fix: whyDidYouRender error (#13040)
### What problem does this PR solve? Fix: whyDidYouRender error ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M22 12H2M22 12V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V12M22 12L18.55 5.11C18.3844 4.77679 18.1292 4.49637 17.813 4.30028C17.4967 4.10419 17.1321 4.0002 16.76 4H7.24C6.86792 4.0002 6.50326 4.10419 6.18704 4.30028C5.87083 4.49637 5.61558 4.77679 5.45 5.11L2 12" stroke="url(#paint0_linear_1415_84974)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6 16H6.01M10 16H10.01" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 12C12.8284 12 13.5 12.6716 13.5 13.5C13.5 14.3284 12.8284 15 12 15C11.1716 15 10.5 14.3284 10.5 13.5C10.5 12.6716 11.1716 12 12 12ZM7.5 4.5C8.32843 4.5 9 5.17157 9 6C9 6.82843 8.32843 7.5 7.5 7.5C6.67157 7.5 6 6.82843 6 6C6 5.17157 6.67157 4.5 7.5 4.5ZM16.5 4.5C17.3284 4.5 18 5.17157 18 6C18 6.82843 17.3284 7.5 16.5 7.5C15.6716 7.5 15 6.82843 15 6C15 5.17157 15.6716 4.5 16.5 4.5Z" fill="#00BEB4"/>
|
||||
<path d="M3 16.5C3.82843 16.5 4.5 17.1716 4.5 18C4.49991 18.8284 3.82837 19.5 3 19.5C2.17163 19.5 1.50009 18.8284 1.5 18C1.5 17.1716 2.17157 16.5 3 16.5ZM21 16.5C21.8284 16.5 22.5 17.1716 22.5 18C22.4999 18.8284 21.8284 19.5 21 19.5C20.1716 19.5 19.5001 18.8284 19.5 18C19.5 17.1716 20.1716 16.5 21 16.5ZM6.47949 8.2373C6.58999 7.98449 6.88471 7.86922 7.1377 7.97949C7.39047 8.09001 7.50577 8.38473 7.39551 8.6377L4.20801 15.9502C4.09747 16.2029 3.80273 16.3182 3.5498 16.208C3.29703 16.0975 3.18182 15.8028 3.29199 15.5498L6.47949 8.2373ZM16.8623 7.97949C17.1153 7.86922 17.41 7.98449 17.5205 8.2373L20.708 15.5498C20.8182 15.8027 20.7029 16.0975 20.4502 16.208C20.1973 16.3182 19.9025 16.2029 19.792 15.9502L16.6045 8.6377C16.4942 8.38473 16.6095 8.09001 16.8623 7.97949ZM8.23242 8.07715C8.46573 7.92951 8.77516 7.99914 8.92285 8.23242L10.6631 10.9824C10.8107 11.2157 10.742 11.5252 10.5088 11.6729C10.2755 11.8205 9.96608 11.7508 9.81836 11.5176L8.07715 8.76758C7.92953 8.5343 7.99919 8.22486 8.23242 8.07715ZM15.0742 8.17578C15.2189 7.94069 15.5266 7.86718 15.7617 8.01172C15.9968 8.15642 16.0703 8.4641 15.9258 8.69922L14.1953 11.5117C14.0506 11.7468 13.742 11.8204 13.5068 11.6758C13.272 11.5311 13.1985 11.2233 13.3428 10.9883L15.0742 8.17578Z" fill="url(#paint0_linear_2502_23663)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_1415_84974" x1="12.5556" y1="4" x2="12.5556" y2="20" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint0_linear_2502_23663" x1="12.5833" y1="7.9375" x2="12.5833" y2="19.4998" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#161618"/>
|
||||
<stop offset="1" stop-color="#666666"/>
|
||||
</linearGradient>
|
||||
|
||||
|
Before Width: | Height: | Size: 935 B After Width: | Height: | Size: 2.0 KiB |
@ -1,14 +1,8 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="memory dark">
|
||||
<g id="lucide/hard-drive">
|
||||
<path id="Vector" d="M22 12H2M22 12V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V12M22 12L18.55 5.11C18.3844 4.77679 18.1292 4.49637 17.813 4.30028C17.4967 4.10419 17.1321 4.0002 16.76 4H7.24C6.86792 4.0002 6.50326 4.10419 6.18704 4.30028C5.87083 4.49637 5.61558 4.77679 5.45 5.11L2 12" stroke="url(#paint0_linear_1100_4836)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<g id="lucide/hard-drive_2">
|
||||
<path id="Vector_2" d="M6 16H6.01M10 16H10.01" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
</g>
|
||||
<path d="M12 12C12.8284 12 13.5 12.6716 13.5 13.5C13.5 14.3284 12.8284 15 12 15C11.1716 15 10.5 14.3284 10.5 13.5C10.5 12.6716 11.1716 12 12 12ZM7.5 4.5C8.32843 4.5 9 5.17157 9 6C9 6.82843 8.32843 7.5 7.5 7.5C6.67157 7.5 6 6.82843 6 6C6 5.17157 6.67157 4.5 7.5 4.5ZM16.5 4.5C17.3284 4.5 18 5.17157 18 6C18 6.82843 17.3284 7.5 16.5 7.5C15.6716 7.5 15 6.82843 15 6C15 5.17157 15.6716 4.5 16.5 4.5Z" fill="#00BEB4"/>
|
||||
<path d="M3 16.5C3.82843 16.5 4.5 17.1716 4.5 18C4.49991 18.8284 3.82837 19.5 3 19.5C2.17163 19.5 1.50009 18.8284 1.5 18C1.5 17.1716 2.17157 16.5 3 16.5ZM21 16.5C21.8284 16.5 22.5 17.1716 22.5 18C22.4999 18.8284 21.8284 19.5 21 19.5C20.1716 19.5 19.5001 18.8284 19.5 18C19.5 17.1716 20.1716 16.5 21 16.5ZM6.47949 8.2373C6.58999 7.98449 6.88471 7.86922 7.1377 7.97949C7.39047 8.09001 7.50577 8.38473 7.39551 8.6377L4.20801 15.9502C4.09747 16.2029 3.80273 16.3182 3.5498 16.208C3.29703 16.0975 3.18182 15.8028 3.29199 15.5498L6.47949 8.2373ZM16.8623 7.97949C17.1153 7.86922 17.41 7.98449 17.5205 8.2373L20.708 15.5498C20.8182 15.8027 20.7029 16.0975 20.4502 16.208C20.1973 16.3182 19.9025 16.2029 19.792 15.9502L16.6045 8.6377C16.4942 8.38473 16.6095 8.09001 16.8623 7.97949ZM8.23242 8.07715C8.46573 7.92951 8.77516 7.99914 8.92285 8.23242L10.6631 10.9824C10.8107 11.2157 10.742 11.5252 10.5088 11.6729C10.2755 11.8205 9.96608 11.7508 9.81836 11.5176L8.07715 8.76758C7.92953 8.5343 7.99919 8.22486 8.23242 8.07715ZM15.0742 8.17578C15.2189 7.94069 15.5266 7.86718 15.7617 8.01172C15.9968 8.15642 16.0703 8.4641 15.9258 8.69922L14.1953 11.5117C14.0506 11.7468 13.742 11.8204 13.5068 11.6758C13.272 11.5311 13.1985 11.2233 13.3428 10.9883L15.0742 8.17578Z" fill="url(#paint0_linear_2502_23677)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_1100_4836" x1="12.5556" y1="4" x2="12.5556" y2="20" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint0_linear_2502_23677" x1="12.5833" y1="7.9375" x2="12.5833" y2="19.4998" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#666666"/>
|
||||
</linearGradient>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.0 KiB |
@ -1,4 +1,4 @@
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { lazy, memo, Suspense } from 'react';
|
||||
import { createBrowserRouter, Navigate, type RouteObject } from 'react-router';
|
||||
import FallbackComponent from './components/fallback-component';
|
||||
import { IS_ENTERPRISE } from './pages/admin/utils';
|
||||
@ -92,7 +92,8 @@ const withLazyRoute = (
|
||||
LazyComponent.name ||
|
||||
'Component'
|
||||
})`;
|
||||
return Wrapped;
|
||||
Wrapped.whyDidYouRender = false;
|
||||
return process.env.NODE_ENV === 'development' ? LazyComponent : memo(Wrapped);
|
||||
};
|
||||
|
||||
const routeConfigOptions = [
|
||||
|
||||
Reference in New Issue
Block a user