aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/ModMenu.tsx
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2025-10-22 13:59:12 +0400
committerGitHub <noreply@github.com>2025-10-22 12:59:12 +0300
commit69aeb7889ac136a8e4fbe7de1330298e30345479 (patch)
tree6b2cd2d420105dc7ffad3c3649df359f634cae77 /frontend/src/components/ModMenu.tsx
parentfeat/rankings: update wr for 3 maps (#279) (diff)
downloadlphub-69aeb7889ac136a8e4fbe7de1330298e30345479.tar.gz
lphub-69aeb7889ac136a8e4fbe7de1330298e30345479.tar.bz2
lphub-69aeb7889ac136a8e4fbe7de1330298e30345479.zip
feat/frontend: switch to vite, update node to v22 (#281)
Diffstat (limited to 'frontend/src/components/ModMenu.tsx')
-rw-r--r--frontend/src/components/ModMenu.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/frontend/src/components/ModMenu.tsx b/frontend/src/components/ModMenu.tsx
index 925b8a8..19ce0ce 100644
--- a/frontend/src/components/ModMenu.tsx
+++ b/frontend/src/components/ModMenu.tsx
@@ -1,12 +1,12 @@
1import React from 'react'; 1import React from "react";
2import ReactMarkdown from 'react-markdown'; 2import ReactMarkdown from "react-markdown";
3import { useNavigate } from 'react-router-dom'; 3import { useNavigate } from "react-router-dom";
4 4
5import { MapSummary } from '@customTypes/Map'; 5import { MapSummary } from "@customTypes/Map";
6import { ModMenuContent } from '@customTypes/Content'; 6import { ModMenuContent } from "@customTypes/Content";
7import { API } from '@api/Api'; 7import { API } from "@api/Api";
8import "@css/ModMenu.css" 8import "@css/ModMenu.css"
9import useConfirm from '@hooks/UseConfirm'; 9import useConfirm from "@hooks/UseConfirm";
10 10
11interface ModMenuProps { 11interface ModMenuProps {
12 token?: string; 12 token?: string;
@@ -55,10 +55,10 @@ const ModMenu: React.FC<ModMenuProps> = ({ token, data, selectedRun, mapID }) =>
55 width *= 320 / height; 55 width *= 320 / height;
56 height = 320; 56 height = 320;
57 } 57 }
58 const canvas = document.createElement('canvas'); 58 const canvas = document.createElement("canvas");
59 canvas.width = width; 59 canvas.width = width;
60 canvas.height = height; 60 canvas.height = height;
61 canvas.getContext('2d')!.drawImage(img, 0, 0, width, height); 61 canvas.getContext("2d")!.drawImage(img, 0, 0, width, height);
62 resolve(canvas.toDataURL(file.type, 0.6)); 62 resolve(canvas.toDataURL(file.type, 0.6));
63 }; 63 };
64 } 64 }