fix: Team logo shows as white in settings (#3015)

* fix: Team logo shows as white in settings
fix: Team logo doesnt update in sidebar immediately after updating
refactor to ImageUpload component

* text
This commit is contained in:
Tom Moor
2022-01-26 22:47:26 -08:00
committed by GitHub
parent afb0dad0a5
commit 76e98c31e3
5 changed files with 129 additions and 142 deletions

View File

@@ -16,16 +16,16 @@ import { uploadFile, dataUrlToBlob } from "~/utils/uploadFile";
const EMPTY_OBJECT = {};
type Props = RootStore & {
export type Props = {
children?: React.ReactNode;
onSuccess: (arg0: string) => void | Promise<void>;
onError: (arg0: string) => void;
onSuccess: (url: string) => void | Promise<void>;
onError: (error: string) => void;
submitText?: string;
borderRadius?: number;
};
@observer
class ImageUpload extends React.Component<Props> {
class ImageUpload extends React.Component<RootStore & Props> {
@observable
isUploading = false;
@@ -41,7 +41,7 @@ class ImageUpload extends React.Component<Props> {
avatarEditorRef = React.createRef<AvatarEditor>();
static defaultProps = {
submitText: "Crop Picture",
submitText: "Crop Image",
borderRadius: 150,
};