FIX: Biome automatic updates
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
3d970acc34
commit
bc9fefcb70
@@ -1,9 +1,11 @@
|
||||
import "./App.css";
|
||||
import styled from "@emotion/styled";
|
||||
// From IronCalc
|
||||
import { IronCalc, IronCalcIcon, init, Model } from "@ironcalc/workbook";
|
||||
import { Modal } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
import { FileBar } from "./components/FileBar";
|
||||
import LeftDrawer from "./components/LeftDrawer/LeftDrawer";
|
||||
import WelcomeDialog from "./components/WelcomeDialog/WelcomeDialog";
|
||||
import {
|
||||
get_documentation_model,
|
||||
get_model,
|
||||
@@ -20,11 +22,8 @@ import {
|
||||
saveSelectedModelInStorage,
|
||||
selectModelFromStorage,
|
||||
} from "./components/storage";
|
||||
|
||||
// From IronCalc
|
||||
import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/workbook";
|
||||
import { Modal } from "@mui/material";
|
||||
import TemplatesDialog from "./components/WelcomeDialog/TemplatesDialog";
|
||||
import WelcomeDialog from "./components/WelcomeDialog/WelcomeDialog";
|
||||
|
||||
function App() {
|
||||
const [model, setModel] = useState<Model | null>(null);
|
||||
|
||||
@@ -5,11 +5,11 @@ import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
||||
import { useLayoutEffect, useRef, useState } from "react";
|
||||
import { FileMenu } from "./FileMenu";
|
||||
import { HelpMenu } from "./HelpMenu";
|
||||
import { downloadModel } from "./rpc";
|
||||
import { ShareButton } from "./ShareButton";
|
||||
import ShareWorkbookDialog from "./ShareWorkbookDialog";
|
||||
import { WorkbookTitle } from "./WorkbookTitle";
|
||||
import { downloadModel } from "./rpc";
|
||||
import { updateNameSelectedWorkbook } from "./storage";
|
||||
import { WorkbookTitle } from "./WorkbookTitle";
|
||||
|
||||
// This hook is used to get the width of the window
|
||||
function useWindowWidth() {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { Menu, MenuItem, Modal } from "@mui/material";
|
||||
import { FileDown, FileUp, Plus, Table2, Trash2 } from "lucide-react";
|
||||
import { useRef, useState } from "react";
|
||||
import DeleteWorkbookDialog from "./DeleteWorkbookDialog";
|
||||
import UploadFileDialog from "./UploadFileDialog";
|
||||
// import TemplatesDialog from "./WelcomeDialog/TemplatesDialog";
|
||||
import { getModelsMetadata, getSelectedUuid } from "./storage";
|
||||
import UploadFileDialog from "./UploadFileDialog";
|
||||
|
||||
export function FileMenu(props: {
|
||||
newModel: () => void;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Model } from "@ironcalc/workbook";
|
||||
import { Button, Dialog, TextField, styled } from "@mui/material";
|
||||
import { Button, Dialog, styled, TextField } from "@mui/material";
|
||||
import { Check, Copy, GlobeLock } from "lucide-react";
|
||||
import { QRCodeSVG } from "qrcode.react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
@@ -2,8 +2,6 @@ import { IronCalcIconWhite as IronCalcIcon } from "@ironcalc/workbook";
|
||||
import { styled } from "@mui/material";
|
||||
import { Table, X } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import TemplatesListItem from "./TemplatesListItem";
|
||||
|
||||
import TemplatesList, {
|
||||
Cross,
|
||||
DialogContent,
|
||||
@@ -12,6 +10,7 @@ import TemplatesList, {
|
||||
DialogWrapper,
|
||||
TemplatesListWrapper,
|
||||
} from "./TemplatesList";
|
||||
import TemplatesListItem from "./TemplatesListItem";
|
||||
|
||||
function WelcomeDialog(properties: {
|
||||
onClose: () => void;
|
||||
|
||||
@@ -23,7 +23,7 @@ function sanitizeFileName(name: string): string {
|
||||
|
||||
export async function uploadFile(
|
||||
arrayBuffer: ArrayBuffer,
|
||||
fileName: string
|
||||
fileName: string,
|
||||
): Promise<Blob> {
|
||||
// Fetch request to upload the file
|
||||
const response = await fetch(`/api/upload/${fileName}`, {
|
||||
@@ -40,15 +40,15 @@ export async function uploadFile(
|
||||
|
||||
export async function get_model(modelHash: string): Promise<Uint8Array> {
|
||||
return new Uint8Array(
|
||||
await (await fetch(`/api/model/${modelHash}`)).arrayBuffer()
|
||||
await (await fetch(`/api/model/${modelHash}`)).arrayBuffer(),
|
||||
);
|
||||
}
|
||||
|
||||
export async function get_documentation_model(
|
||||
filename: string
|
||||
filename: string,
|
||||
): Promise<Uint8Array> {
|
||||
return new Uint8Array(
|
||||
await (await fetch(`/models/${filename}.ic`)).arrayBuffer()
|
||||
await (await fetch(`/models/${filename}.ic`)).arrayBuffer(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user