Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dariaterekhova-actionengine committed Nov 28, 2024
1 parent f5bd6de commit ea261de
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/layers-panel/insert-panel/insert-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ChangeEvent, useEffect, useState } from "react";
import { type useEffect, useState } from "react";
import styled from "styled-components";

import {
Expand Down Expand Up @@ -119,7 +119,7 @@ export const InsertPanel = ({
const layerNames = useAppSelector(selectLayerNames);
const dispatch = useAppDispatch();

const getNewLayerUrl = () => getLayerUrl(url)
const getNewLayerUrl = () => getLayerUrl(url);

const validateFields = (): void => {
let isFormValid = true;
Expand Down
2 changes: 1 addition & 1 deletion src/components/upload-panel/upload-panel-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const UploadPanelItem = ({
<Content>
{title && <Title>{title}</Title>}
{children}
{(onConfirm || onCancel) && <ButtonsContainer justify={onConfirm ? "space-between" : "center"}>
{(onConfirm ?? onCancel) && <ButtonsContainer justify={onConfirm ? "space-between" : "center"}>
{onCancel && <ActionButton
variant={ActionButtonVariant.secondary}
onClick={onCancel}
Expand Down
6 changes: 3 additions & 3 deletions src/components/upload-panel/upload-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const UploadPanel = ({
const info: Record<string, unknown> = {
url: file.name,
};
onFileUploaded({ fileContent: event?.target?.result, info });
await onFileUploaded({ fileContent: event?.target?.result, info });
};
if (fileType === FileType.binary) {
reader.readAsArrayBuffer(file);
Expand All @@ -114,7 +114,7 @@ export const UploadPanel = ({
e.stopPropagation();
setDragActive(false);
if (e.dataTransfer.files?.[0]) {
setFileUploaded(e.dataTransfer.files[0].name)
setFileUploaded(e.dataTransfer.files[0].name);
readFile(e.dataTransfer.files).catch(() => {
console.error("Read uploaded file operation error");
});
Expand All @@ -126,7 +126,7 @@ export const UploadPanel = ({
) {
e.preventDefault();
if (e.target.files?.[0]) {
setFileUploaded(e.target.files[0].name)
setFileUploaded(e.target.files[0].name);
readFile(e.target.files).catch(() => {
console.error("Read uploaded file operation error");
});
Expand Down
2 changes: 1 addition & 1 deletion src/redux/slices/layer-names-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const getLayerNameInfo = createAsyncThunk<
{ layerUrl: string | File; type: TilesetType; token: string }
>("getLayerNameInfo", async ({ layerUrl, type, token }) => {
if (typeof layerUrl !== "string") {
return { name: '', layerUrl: layerUrl.name };
return { name: "", layerUrl: layerUrl.name };
}
const params = parseTilesetUrlParams(layerUrl, { type, token });
let url = params.tilesetUrl;
Expand Down

0 comments on commit ea261de

Please sign in to comment.