mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
fix: lint warning
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { absoluteCenter, displayFlex, styled } from '@/styles';
|
||||
import { styled } from '@/styles';
|
||||
|
||||
export const PageContainer = styled('div')(({ theme }) => {
|
||||
return {
|
||||
|
||||
@@ -71,7 +71,7 @@ export const GithubIcon = () => {
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
export const DiscordIcon = (props: any) => {
|
||||
export const DiscordIcon = () => {
|
||||
return (
|
||||
<svg
|
||||
width="22"
|
||||
|
||||
@@ -120,7 +120,7 @@ export const StyledLogo = styled('img')({
|
||||
width: 'auto',
|
||||
});
|
||||
|
||||
export const StyledModalHeader = styled('div')(({ theme }) => {
|
||||
export const StyledModalHeader = styled('div')(() => {
|
||||
return {
|
||||
height: '20px',
|
||||
marginTop: '36px',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ResetIcon } from '@blocksuite/icons';
|
||||
import { styled } from '@/styles';
|
||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
||||
import { Button, TextButton } from '@/ui/button';
|
||||
import { Button } from '@/ui/button';
|
||||
import Input from '@/ui/input';
|
||||
import { useState } from 'react';
|
||||
|
||||
@@ -96,9 +96,3 @@ const Footer = styled('div')({
|
||||
marginTop: '32px',
|
||||
textAlign: 'center',
|
||||
});
|
||||
|
||||
const StyledResetIcon = styled(ResetIcon)({
|
||||
marginRight: '12px',
|
||||
width: '20px',
|
||||
height: '20px',
|
||||
});
|
||||
|
||||
@@ -79,20 +79,6 @@ const toolbarList1 = [
|
||||
disable: true,
|
||||
},
|
||||
];
|
||||
const toolbarList2 = [
|
||||
{
|
||||
flavor: 'undo',
|
||||
icon: <UndoIcon />,
|
||||
toolTip: 'Undo',
|
||||
disable: false,
|
||||
},
|
||||
{
|
||||
flavor: 'redo',
|
||||
icon: <RedoIcon />,
|
||||
toolTip: 'Redo',
|
||||
disable: false,
|
||||
},
|
||||
];
|
||||
|
||||
const UndoRedo = () => {
|
||||
const [canUndo, setCanUndo] = useState(false);
|
||||
|
||||
@@ -9,7 +9,7 @@ export const StyledHeaderContainer = styled.div<{ hasWarning: boolean }>(
|
||||
}
|
||||
);
|
||||
export const StyledHeader = styled.div<{ hasWarning: boolean }>(
|
||||
({ hasWarning, theme }) => {
|
||||
({ hasWarning }) => {
|
||||
return {
|
||||
height: '60px',
|
||||
width: '100%',
|
||||
|
||||
@@ -6,7 +6,6 @@ import Input from '@/ui/input';
|
||||
import { useState } from 'react';
|
||||
import { inviteMember, getUserByEmail } from '@pathfinder/data-services';
|
||||
import { Avatar } from '@mui/material';
|
||||
import { toast } from '@/ui/toast';
|
||||
interface LoginModalProps {
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
|
||||
@@ -10,7 +10,7 @@ export const GoogleLoginButton = () => {
|
||||
<StyledGoogleButton
|
||||
onClick={() => {
|
||||
signInWithGoogle()
|
||||
.then(async => {
|
||||
.then(() => {
|
||||
triggerLoginModal();
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -47,7 +47,7 @@ export const StayLogOutButton = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const StyledGoogleButton = styled(Button)(({ theme }) => {
|
||||
const StyledGoogleButton = styled(Button)(() => {
|
||||
return {
|
||||
width: '361px',
|
||||
height: '56px',
|
||||
@@ -66,7 +66,7 @@ const StyledGoogleButton = styled(Button)(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
const StyledStayLogOutButton = styled(Button)(({ theme }) => {
|
||||
const StyledStayLogOutButton = styled(Button)(() => {
|
||||
return {
|
||||
width: '361px',
|
||||
height: '56px',
|
||||
@@ -101,7 +101,7 @@ const TextWrapper = styled('div')({
|
||||
textAlign: 'left',
|
||||
});
|
||||
|
||||
const Title = styled('h1')(({ theme }) => {
|
||||
const Title = styled('h1')(() => {
|
||||
return {
|
||||
fontSize: '18px',
|
||||
lineHeight: '26px',
|
||||
@@ -109,7 +109,7 @@ const Title = styled('h1')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
const Description = styled('p')(({ theme }) => {
|
||||
const Description = styled('p')(() => {
|
||||
return {
|
||||
fontSize: '16px',
|
||||
lineHeight: '22px',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { displayFlex, styled } from '@/styles';
|
||||
|
||||
export const StyledTitle = styled.div(({ theme }) => {
|
||||
export const StyledTitle = styled.div(() => {
|
||||
return {
|
||||
...displayFlex('center', 'center'),
|
||||
fontSize: '20px',
|
||||
@@ -10,7 +10,7 @@ export const StyledTitle = styled.div(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledContent = styled.div(({ theme }) => {
|
||||
export const StyledContent = styled.div(() => {
|
||||
return {
|
||||
padding: '0 40px',
|
||||
marginTop: '32px',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useConfirm } from '@/providers/confirm-provider';
|
||||
import { useAppState, PageMeta } from '@/providers/app-state-provider';
|
||||
import { PageMeta } from '@/providers/app-state-provider';
|
||||
import { Menu, MenuItem } from '@/ui/menu';
|
||||
import { Wrapper } from '@/ui/layout';
|
||||
import { IconButton } from '@/ui/button';
|
||||
|
||||
@@ -26,7 +26,7 @@ export const StyledSettingSidebar = styled('div')(({ theme }) => {
|
||||
}
|
||||
});
|
||||
|
||||
export const StyledSettingContent = styled('div')(({ theme }) => {
|
||||
export const StyledSettingContent = styled('div')(() => {
|
||||
return {
|
||||
paddingLeft: '48px',
|
||||
height: '620px',
|
||||
@@ -43,7 +43,7 @@ export const StyledSetting = styled('div')(({ theme }) => {
|
||||
}
|
||||
});
|
||||
|
||||
export const StyledSettingSidebarHeader = styled('div')(({ theme }) => {
|
||||
export const StyledSettingSidebarHeader = styled('div')(() => {
|
||||
{
|
||||
return {
|
||||
fontWeight: '500',
|
||||
@@ -55,7 +55,7 @@ export const StyledSettingSidebarHeader = styled('div')(({ theme }) => {
|
||||
}
|
||||
});
|
||||
|
||||
export const StyledSettingTabContainer = styled('ul')(({ theme }) => {
|
||||
export const StyledSettingTabContainer = styled('ul')(() => {
|
||||
{
|
||||
return {
|
||||
display: 'flex',
|
||||
@@ -83,7 +83,7 @@ export const WorkspaceSettingTagItem = styled('li')<{ isActive?: boolean }>(
|
||||
}
|
||||
);
|
||||
|
||||
export const StyledSettingTagIconContainer = styled('div')(({ theme }) => {
|
||||
export const StyledSettingTagIconContainer = styled('div')(() => {
|
||||
return {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -94,7 +94,7 @@ export const StyledSettingTagIconContainer = styled('div')(({ theme }) => {
|
||||
});
|
||||
|
||||
export const StyledSettingH2 = styled('h2')<{ marginTop?: number }>(
|
||||
({ marginTop, theme }) => {
|
||||
({ marginTop }) => {
|
||||
return {
|
||||
fontWeight: '500',
|
||||
fontSize: '18px',
|
||||
@@ -112,7 +112,7 @@ export const StyledAvatarUploadBtn = styled(Button)(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberTitleContainer = styled('div')(({ theme }) => {
|
||||
export const StyledMemberTitleContainer = styled('div')(() => {
|
||||
return {
|
||||
display: 'flex',
|
||||
marginTop: '60px',
|
||||
@@ -120,11 +120,11 @@ export const StyledMemberTitleContainer = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberAvatar = styled(MuiAvatar)(({ theme }) => {
|
||||
export const StyledMemberAvatar = styled(MuiAvatar)(() => {
|
||||
return { height: '40px', width: '40px' };
|
||||
});
|
||||
|
||||
export const StyledMemberNameContainer = styled('div')(({ theme }) => {
|
||||
export const StyledMemberNameContainer = styled('div')(() => {
|
||||
return {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -132,7 +132,7 @@ export const StyledMemberNameContainer = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberRoleContainer = styled('div')(({ theme }) => {
|
||||
export const StyledMemberRoleContainer = styled('div')(() => {
|
||||
return {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -140,7 +140,7 @@ export const StyledMemberRoleContainer = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberListContainer = styled('ul')(({ theme }) => {
|
||||
export const StyledMemberListContainer = styled('ul')(() => {
|
||||
return {
|
||||
marginTop: '15px',
|
||||
height: '432px',
|
||||
@@ -148,7 +148,7 @@ export const StyledMemberListContainer = styled('ul')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberListItem = styled('li')(({ theme }) => {
|
||||
export const StyledMemberListItem = styled('li')(() => {
|
||||
return {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -156,7 +156,7 @@ export const StyledMemberListItem = styled('li')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberInfo = styled('div')(({ theme }) => {
|
||||
export const StyledMemberInfo = styled('div')(() => {
|
||||
return {
|
||||
paddingLeft: '12px',
|
||||
};
|
||||
@@ -180,13 +180,13 @@ export const StyledMemberEmail = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMemberButtonContainer = styled('div')(({ theme }) => {
|
||||
export const StyledMemberButtonContainer = styled('div')(() => {
|
||||
return {
|
||||
marginTop: '14px',
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledMoreVerticalButton = styled('button')(({ theme }) => {
|
||||
export const StyledMoreVerticalButton = styled('button')(() => {
|
||||
return {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
@@ -197,7 +197,7 @@ export const StyledMoreVerticalButton = styled('button')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledPublishExplanation = styled('div')(({ theme }) => {
|
||||
export const StyledPublishExplanation = styled('div')(() => {
|
||||
return {
|
||||
marginTop: '56px',
|
||||
paddingRight: '48px',
|
||||
@@ -207,7 +207,7 @@ export const StyledPublishExplanation = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledPublishCopyContainer = styled('div')(({ theme }) => {
|
||||
export const StyledPublishCopyContainer = styled('div')(() => {
|
||||
return {
|
||||
marginTop: '12px',
|
||||
display: 'flex',
|
||||
@@ -217,13 +217,13 @@ export const StyledPublishCopyContainer = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledCopyButtonContainer = styled('div')(({ theme }) => {
|
||||
export const StyledCopyButtonContainer = styled('div')(() => {
|
||||
return {
|
||||
marginLeft: '12px',
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledPublishContent = styled('div')(({ theme }) => {
|
||||
export const StyledPublishContent = styled('div')(() => {
|
||||
return {
|
||||
height: '494px',
|
||||
};
|
||||
|
||||
-1
@@ -5,7 +5,6 @@ import {
|
||||
} from '@pathfinder/data-services';
|
||||
import Modal from '@/ui/modal';
|
||||
import Input from '@/ui/input';
|
||||
import { Button } from '@/ui/button';
|
||||
import {
|
||||
StyledModalHeader,
|
||||
StyledTextContent,
|
||||
|
||||
@@ -33,14 +33,10 @@ const DynamicBlocksuite = ({
|
||||
new Promise(async resolve => {
|
||||
const workspace = new Workspace({
|
||||
room: workspaceId,
|
||||
providers: [IndexedDBDocProvider],
|
||||
providers: [],
|
||||
}).register(BlockSchema);
|
||||
|
||||
if (
|
||||
websocket &&
|
||||
token.refresh &&
|
||||
location.search.includes('sync=websocket')
|
||||
) {
|
||||
if (websocket && token.refresh) {
|
||||
// FIXME: if add websocket provider, the first page will be blank
|
||||
const ws = new WebsocketProvider(
|
||||
`ws${window.location.protocol === 'https:' ? 's' : ''}://${
|
||||
|
||||
Reference in New Issue
Block a user