fix: lint error and build error

This commit is contained in:
DiamondThree
2023-01-10 23:13:22 +08:00
parent d7e6654965
commit eef467558e
11 changed files with 24 additions and 22 deletions
@@ -1,7 +1,4 @@
import { useAppState } from '@/providers/app-state-provider';
import { stringToColour } from '@/utils';
import { useEffect, useState } from 'react';
interface IWorkspaceAvatar {
size: number;
name: string;
@@ -25,7 +22,9 @@ export const WorkspaceAvatar = (props: IWorkspaceAvatar) => {
overflow: 'hidden',
}}
>
<img src={props.avatar} alt="" />
<picture>
<img src={props.avatar} alt="" />
</picture>
</div>
) : (
<div
@@ -43,7 +43,7 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
// await login();
// }
const id = await enableWorkspace(currentWorkspace);
router.push(`/workspace/${id}`);
router.push(`/workspace/${id}/setting`);
toast('Enabled success');
}
});
@@ -48,9 +48,11 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
const fileChange = async (file: File) => {
// console.log('file: ', file);
// setUploading(true);
setUploading(true);
const blob = new Blob([file], { type: file.type });
currentWorkspace && updateWorkspace({ avatarBlob: blob }, currentWorkspace);
currentWorkspace &&
(await updateWorkspace({ avatarBlob: blob }, currentWorkspace));
setUploading(false);
};
return workspace ? (
@@ -2,7 +2,7 @@ import { styled } from '@/styles';
import { Button } from '@/ui/button';
import MuiAvatar from '@mui/material/Avatar';
export const StyledSettingContainer = styled('div')(({ theme }) => {
export const StyledSettingContainer = styled('div')(() => {
return {
display: 'flex',
padding: '50px',
@@ -12,7 +12,7 @@ export const StyledSettingContainer = styled('div')(({ theme }) => {
};
});
export const StyledSettingSidebar = styled('div')(({ theme }) => {
export const StyledSettingSidebar = styled('div')(() => {
{
return {
flexShrink: 0,