chore: migrate from preact to react (#4435)
This commit is contained in:
1 parent
c274feced1
commit
5c57a84e82
142 files changed
+931
-907
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'preact/hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useCopyText() {
|
||||
const [isCopied, setIsCopied] = useState(false);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect } from 'preact/hooks';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export function useKeydown(keyName: string, callback: any, deps: any[] = []) {
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect } from 'preact/hooks';
|
||||
import { useEffect } from 'react';
|
||||
import type { ResourceType } from '../lib/resource-progress';
|
||||
|
||||
type CallbackType = (data: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect } from 'preact/hooks';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export function useOutsideClick(ref: any, callback: any) {
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export function useParams<T = Record<string, any>>(): T {
|
||||
const [params, setParams] = useState<T>({} as T);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'preact/hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useTeamId() {
|
||||
const [teamId, setTeamId] = useState<string | null>(null);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect } from 'preact/hooks';
|
||||
import { useEffect } from 'react';
|
||||
import type { ResourceType } from '../lib/resource-progress';
|
||||
|
||||
type CallbackType = (data: {
|
||||
|
||||
Reference in new issue
Block a user