react-toolkits 2.11.8 → 2.11.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.11.10
4
+
5
+ ### Patch Changes
6
+
7
+ - aea065d: fix: remove navigate
8
+
9
+ ## 2.11.9
10
+
11
+ ### Patch Changes
12
+
13
+ - 5241a1b: fix: missing Navigate
14
+
3
15
  ## 2.11.8
4
16
 
5
17
  ### Patch Changes
package/lib/index.d.ts CHANGED
@@ -487,7 +487,7 @@ type JsonData<T = any> = {
487
487
  };
488
488
  declare const Interceptor: ({ children }: {
489
489
  children?: ReactNode;
490
- }) => string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
490
+ }) => ReactNode;
491
491
 
492
492
  declare const mixedStorage: StateStorage;
493
493
 
package/lib/index.js CHANGED
@@ -4,14 +4,14 @@ import { create, useStore, createStore } from 'zustand';
4
4
  import { persist, createJSONStorage } from 'zustand/middleware';
5
5
  import * as Antd2 from 'antd';
6
6
  import { Spin, Menu, Modal, Form, App, theme, Space, Input, Tag, Typography, Result, Table, Button, Empty, Dropdown, Divider, Card, Select, Alert, Switch, InputNumber, Row, Col, Breadcrumb, Skeleton, Descriptions, Tooltip, Popconfirm, Collapse, Checkbox } from 'antd';
7
- import { useLocation, Routes, Route, Navigate, Link, useNavigate, useParams } from 'react-router-dom';
8
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
7
  import { memo, useMemo, useCallback, useEffect, lazy, useContext, useState, useRef, Fragment as Fragment$1, Suspense, createContext, forwardRef, useImperativeHandle, cloneElement } from 'react';
10
8
  import useSWR5, { mutate, SWRConfig, unstable_serialize } from 'swr';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
10
  import { has, template, get, isEqual } from 'lodash-es';
12
11
  import { flushSync } from 'react-dom';
13
12
  import { createRoot } from 'react-dom/client';
14
13
  import useSWRMutation2 from 'swr/mutation';
14
+ import { useLocation, Routes, Route, Navigate, Link, useNavigate, useParams } from 'react-router-dom';
15
15
  import { Editor } from '@monaco-editor/react';
16
16
  import { PlusOutlined, LogoutOutlined, UserOutlined, MenuUnfoldOutlined, MenuFoldOutlined, UserAddOutlined, UsergroupAddOutlined } from '@ant-design/icons';
17
17
  import { produce } from 'immer';
@@ -283,9 +283,6 @@ var init_axios = __esm({
283
283
  Interceptor = ({ children }) => {
284
284
  const state = useToolkitsStore((s) => s);
285
285
  const { notification } = App.useApp();
286
- if (!state.token) {
287
- return /* @__PURE__ */ jsx(Navigate, { to: state.signInPath });
288
- }
289
286
  if (requestInterceptorId) {
290
287
  axiosInstance.interceptors.request.eject(requestInterceptorId);
291
288
  }