|
@@ -11,6 +11,8 @@ import { lightTheme, darkTheme } from './themes';
|
|
|
import ProductSelector from './components/ProductSelector';
|
|
|
import QuotaAlertModal from './pages/security/QuotaAlertModal';
|
|
|
import AcquisitionTracer from './pages/exam/components/acquisitionTracer';
|
|
|
+import FeatureNotAvailableFeedback from './components/FeatureNotAvailableFeedback';
|
|
|
+import { setFeatureNotAvailableOpen } from './states/featureNotAvailableSlice';
|
|
|
import { logger } from './log/logger';
|
|
|
console.log = logger.log;
|
|
|
console.warn = logger.warn;
|
|
@@ -36,6 +38,9 @@ function AppContent({ children }: { children: ReactNode }): JSX.Element {
|
|
|
const { messages, loading, error, currentLocale } = useAppSelector(
|
|
|
(state) => state.i18n
|
|
|
);
|
|
|
+ const isFeatureNotAvailableOpen = useAppSelector(
|
|
|
+ (state) => state.featureNotAvailable.isOpen
|
|
|
+ );
|
|
|
const [currentTheme, setCurrentTheme] = useState(darkTheme); // 默认使用 light 主题
|
|
|
const [isI18nReady, setIsI18nReady] = useState(false);
|
|
|
|
|
@@ -140,6 +145,10 @@ function AppContent({ children }: { children: ReactNode }): JSX.Element {
|
|
|
>
|
|
|
<AcquisitionTracer />
|
|
|
<QuotaAlertModal />
|
|
|
+ <FeatureNotAvailableFeedback
|
|
|
+ open={isFeatureNotAvailableOpen}
|
|
|
+ onClose={() => dispatch(setFeatureNotAvailableOpen(false))}
|
|
|
+ />
|
|
|
{children}
|
|
|
{process.env.NODE_ENV === 'development' && <ProductSelector />}
|
|
|
<div
|