Skip to content

Commit 1d35344

Browse files
committed
Fix fmt
1 parent 671d7d0 commit 1d35344

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

site/src/modules/templates/TemplateFiles/TemplateFileTree.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { css } from "@emotion/react";
22
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
33
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
44
import FormatAlignLeftOutlined from "@mui/icons-material/FormatAlignLeftOutlined";
5-
import { SimpleTreeView, TreeItem } from '@mui/x-tree-view';
65
import Menu from "@mui/material/Menu";
76
import MenuItem from "@mui/material/MenuItem";
7+
import { SimpleTreeView, TreeItem } from "@mui/x-tree-view";
88
import { DockerIcon } from "components/Icons/DockerIcon";
99
import { type CSSProperties, type ElementType, type FC, useState } from "react";
1010
import type { FileTree } from "utils/filetree";
@@ -79,20 +79,20 @@ export const TemplateFileTree: FC<TemplateFilesTreeProps> = ({
7979
);
8080
}
8181

82-
let icon: ElementType | undefined
83-
if(isFolder(content)) {
84-
icon = FormatAlignLeftOutlined
82+
let icon: ElementType | undefined;
83+
if (isFolder(content)) {
84+
icon = FormatAlignLeftOutlined;
8585
} else if (filename.endsWith(".tf")) {
86-
icon =FileTypeTerraform;
86+
icon = FileTypeTerraform;
8787
} else if (filename.endsWith(".md")) {
8888
icon = FileTypeMarkdown;
8989
} else if (filename.endsWith("Dockerfile")) {
9090
icon = DockerIcon;
91-
};
91+
}
9292

9393
return (
9494
<TreeItem
95-
slots={{ icon }}
95+
slots={{ icon }}
9696
itemId={currentPath}
9797
key={currentPath}
9898
label={
@@ -193,7 +193,7 @@ export const TemplateFileTree: FC<TemplateFilesTreeProps> = ({
193193

194194
return (
195195
<SimpleTreeView
196-
slots={{ collapseIcon: ExpandMoreIcon, expandIcon: ChevronRightIcon, }}
196+
slots={{ collapseIcon: ExpandMoreIcon, expandIcon: ChevronRightIcon }}
197197
aria-label="Files"
198198
defaultExpandedItems={activePath ? expandablePaths(activePath) : []}
199199
defaultSelectedItems={activePath}
@@ -264,7 +264,13 @@ const FileTypeTerraform: FC = () => (
264264
);
265265

266266
const FileTypeMarkdown: FC = () => (
267-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="#755838" role="img" aria-label="Markdown icon">
267+
<svg
268+
xmlns="http://www.w3.org/2000/svg"
269+
viewBox="0 0 32 32"
270+
fill="#755838"
271+
role="img"
272+
aria-label="Markdown icon"
273+
>
268274
<rect
269275
x="2.5"
270276
y="7.955"

0 commit comments

Comments
 (0)