Skip to content

Commit 335079c

Browse files
committed
added support for .svg
1 parent 1be49d1 commit 335079c

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/UI/components/model/modelDataLoader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect } from "react";
22

33
// Define the supported file types for the model files
4-
const SUPPORTED_FILE_TYPES = [".png", ".jpg", ".ant", ".m", ".py", ".jl", ".r", ".txt"];
4+
const SUPPORTED_FILE_TYPES = [".png", ".svg", ".jpg", ".ant", ".m", ".py", ".jl", ".r", ".txt"];
55

66
// Define the ModelDataLoader component
77
const ModelDataLoader = ({

src/UI/components/model/modelDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ImageDisplay from "./imageDisplay";
44
// Define the supported file types for code files
55
const SUPPORTED_FILE_TYPES = [".ant", ".m", ".py", ".jl", ".r", ".txt"];
66
// Define the supported image file types
7-
const SUPPORTED_IMAGE_TYPES = [".png", ".jpg"];
7+
const SUPPORTED_IMAGE_TYPES = [".png", ".jpg", ".svg"];
88

99
// Define the ModelDisplay component
1010
const ModelDisplay = ({

src/UI/components/model/modelFileLoader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const ModelFileLoader = ({
4040
};
4141

4242
// Determine whether the file is an image or not
43-
if (fileName.endsWith(".png") || fileName.endsWith(".jpg")) {
43+
if (fileName.endsWith(".png") || fileName.endsWith(".jpg") || fileName.endsWith(".svg")) {
4444
fetchImage(); // Fetch and display image files
4545
} else {
4646
getFile(); // Fetch and display other types of files

0 commit comments

Comments
 (0)