fix text in viewer

This commit is contained in:
Hamid
2026-05-16 05:25:28 -07:00
parent 0628340a5d
commit f51c7c302c
5 changed files with 56 additions and 17 deletions
@@ -2,14 +2,7 @@ import { useEffect, useLayoutEffect, useRef, useMemo, useState } from "react";
import { Text, Group } from "react-konva";
import Konva from "konva";
import type { TextShapeProps } from "./types";
const getFontFamily = (fontFamily?: string): string => {
const fontMap: Record<string, string> = {
"1": "irancell",
"2": "irancell",
};
return fontMap[fontFamily || "1"] || "irancell";
};
import { getFontFamily } from "@/pages/editor/utils/fontFamily";
const getFontWeight = (fontWeight?: string): string => {
if (!fontWeight) return "normal";