feat: modify workspace modal style & add workspace setting entry to worksapce card (#1498)

This commit is contained in:
Qi
2023-03-10 16:34:45 +08:00
committed by GitHub
parent 16cbf85bf4
commit d60120ddf1
28 changed files with 100 additions and 158 deletions
@@ -7,9 +7,8 @@ import { assertExists } from '@blocksuite/store';
import { render, renderHook } from '@testing-library/react';
import { createStore, getDefaultStore, Provider } from 'jotai';
import { useRouter } from 'next/router';
import React, { useCallback, useState } from 'react';
import React, { useCallback } from 'react';
import { beforeEach, describe, expect, test, vi } from 'vitest';
import createFetchMock from 'vitest-fetch-mock';
import { workspacesAtom } from '../../atoms';
import { useCurrentPageId } from '../../hooks/current/use-current-page-id';
@@ -26,8 +25,6 @@ vi.mock('react-lottie', () => ({
default: (props: React.PropsWithChildren) => <>{props.children}</>,
}));
const fetchMocker = createFetchMock(vi);
// fetchMocker.enableMocks();
let store = getDefaultStore();
beforeEach(async () => {
@@ -58,7 +55,6 @@ describe('WorkSpaceSliderBar', () => {
});
let i = 0;
const Component = () => {
const [show, setShow] = useState(false);
const [currentWorkspace] = useCurrentWorkspace();
const [currentPageId] = useCurrentPageId();
assertExists(currentWorkspace);
@@ -76,8 +72,6 @@ describe('WorkSpaceSliderBar', () => {
i++;
return helper.createPage('page-test-' + i);
}}
show={show}
setShow={setShow}
currentPath={useRouter().asPath}
paths={pathGenerator}
isPublicWorkspace={false}