fix: replaced isMobile with mantine hook

This commit is contained in:
2025-08-10 19:48:29 +04:00
parent 7815f99fa4
commit 6715e4bd38
9 changed files with 26 additions and 30 deletions

View File

@ -1,8 +1,8 @@
import React, { FC, ReactNode, useEffect, useRef, useState } from "react";
import { TextInput } from "@mantine/core";
import { Styles } from "@mantine/core/lib/core/styles-api/styles-api.types";
import { isMobile } from "react-device-detect";
import { modals } from "@mantine/modals";
import useIsMobile from "@/hooks/useIsMobile";
type Props = {
defaultValue?: string;
@ -24,6 +24,7 @@ const InPlaceInput: FC<Props> = ({
const [isWriting, setIsWriting] = useState<boolean>(false);
const [value, setValue] = useState<string>(defaultValue);
const inputRef = useRef<HTMLInputElement>(null);
const isMobile = useIsMobile();
useEffect(() => {
if (isWriting && inputRef.current) {