fix: replaced isMobile with mantine hook
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user