chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
// eslint-disable-next-line @coze-arch/no-batch-import-or-export, @typescript-eslint/consistent-type-imports
|
||||
import * as zustand from 'zustand';
|
||||
import { act } from '@testing-library/react';
|
||||
|
||||
const { create: actualCreate, createStore: actualCreateStore } =
|
||||
// @ts-expect-error -- UT 忽略
|
||||
// @ts-expect-error -- UT ignored
|
||||
await vi.importActual<typeof zustand>('zustand');
|
||||
|
||||
// a variable to hold reset functions for all stores declared in the app
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
/**
|
||||
* 从URL上获取工作空间子模块
|
||||
* Get the workspace submodule from the URL
|
||||
* @param pathname
|
||||
* @returns 工作子模块字符串,如果不匹配则返回 undefined
|
||||
* @Returns the working submodule string, or undefined if it doesn't match
|
||||
*/
|
||||
const getSpaceApp = (pathname: string): string | undefined => {
|
||||
// 以 /space/ 开头,后面跟 spaceId,再跟子模块(只允许字母、数字、-、_)
|
||||
// Start with /space/, followed by spaceId, followed by submodules (only letters, numbers, -, _ allowed)
|
||||
const match = pathname.match(/^\/space\/[^/]+\/([A-Za-z0-9_-]+)/);
|
||||
return match ? match[1] : undefined;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ import { type BotSpace } from '@coze-arch/bot-api/developer_api';
|
||||
export const useRefreshSpaces = (refresh?: boolean) => {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const enterpriseInfo = useCurrentEnterpriseInfo();
|
||||
// 企业发生变化,重新获取空间列表
|
||||
// Businesses change, regain the list of spaces
|
||||
useEffect(() => {
|
||||
if (refresh || !useSpaceStore.getState().inited) {
|
||||
setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user