refactor: extract store package (#1109)

This commit is contained in:
Himself65
2023-02-18 02:41:22 -06:00
committed by GitHub
parent af28418e61
commit 9d21c3efbb
34 changed files with 681 additions and 337 deletions
+4 -1
View File
@@ -28,10 +28,13 @@ const DefaultHeadImgColors = [
export async function getDefaultHeadImgBlob(
workspaceName: string
): Promise<Blob> {
): Promise<Blob | null> {
const canvas = document.createElement('canvas');
canvas.height = 100;
canvas.width = 100;
if (!canvas.getContext) {
return Promise.resolve(null);
}
const ctx = canvas.getContext('2d');
return new Promise<Blob>((resolve, reject) => {
if (ctx) {