mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-24 20:09:02 +00:00
Drop the react import nothing calls
useEffectEvent was named in eleven files that never call it. Ten were in radix-ui alone, against a base-ui copy that upstream keeps byte-identical to it, so an unused name was the entire difference between the two; the eleventh, toc/index.tsx, carried it in both. Restoring the ten from base-ui makes each pair identical again. The symbol is real and React 19.2 exports it -- it is used, twice, in thirteen other files. These eleven just never reached for it.
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
type RefObject,
|
||||
use,
|
||||
useEffect,
|
||||
useEffectEvent,
|
||||
useRef,
|
||||
} from 'react';
|
||||
import { cn } from '@/utils/cn';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { type AlgoliaOptions, useDocsSearch } from '@hanzo/docs-core/search/client';
|
||||
import { type ReactNode, useEffectEvent, useMemo, useState } from 'react';
|
||||
import { type ReactNode, useMemo, useState } from 'react';
|
||||
import { useOnChange } from '@hanzo/docs-core/utils/use-on-change';
|
||||
import {
|
||||
SearchDialog,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useDocsSearch } from '@hanzo/docs-core/search/client';
|
||||
import { type ReactNode, useEffectEvent, useMemo, useState } from 'react';
|
||||
import { type ReactNode, useMemo, useState } from 'react';
|
||||
import { useOnChange } from '@hanzo/docs-core/utils/use-on-change';
|
||||
import { useI18n } from '@/contexts/i18n';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { type OramaCloudOptions, useDocsSearch } from '@hanzo/docs-core/search/client';
|
||||
import { type ReactNode, useEffectEvent, useMemo, useState } from 'react';
|
||||
import { type ReactNode, useMemo, useState } from 'react';
|
||||
import { useOnChange } from '@hanzo/docs-core/utils/use-on-change';
|
||||
import {
|
||||
SearchDialog,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Image, type ImageProps } from '@hanzo/docs-core/framework';
|
||||
import { type ComponentProps, useEffectEvent } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import Zoom, { type UncontrolledProps } from 'react-medium-image-zoom';
|
||||
import './image-zoom.css';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type ReactNode, useEffectEvent } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export function Steps({ children }: { children: ReactNode }) {
|
||||
return <div className="fd-steps">{children}</div>;
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
type RefObject,
|
||||
use,
|
||||
useEffect,
|
||||
useEffectEvent,
|
||||
useRef,
|
||||
} from 'react';
|
||||
import { cn } from '@/utils/cn';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { LoaderConfig, LoaderOutput, Page } from '@hanzo/docs-core/source';
|
||||
import { type ComponentProps, type FC, useEffectEvent } from 'react';
|
||||
import type { ComponentProps, FC } from 'react';
|
||||
import defaultMdxComponents from '@/mdx';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { type ComponentProps, useEffectEvent } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { RootProvider as BaseProvider } from '@/provider/base';
|
||||
import { NextProvider } from '@hanzo/docs-core/framework/next';
|
||||
import type { Framework } from '@hanzo/docs-core/framework';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { type ComponentProps, useEffectEvent } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { RootProvider as BaseProvider } from '@/provider/base';
|
||||
import { ReactRouterProvider } from '@hanzo/docs-core/framework/react-router';
|
||||
import type { Framework } from '@hanzo/docs-core/framework';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { type ComponentProps, useEffectEvent } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { RootProvider as BaseProvider } from '@/provider/base';
|
||||
import { TanstackProvider } from '@hanzo/docs-core/framework/tanstack';
|
||||
import type { Framework } from '@hanzo/docs-core/framework';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { type ComponentProps, useEffectEvent } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { RootProvider as BaseProvider } from '@/provider/base';
|
||||
import { WakuProvider } from '@hanzo/docs-core/framework/waku';
|
||||
import type { Framework } from '@hanzo/docs-core/framework';
|
||||
|
||||
Reference in New Issue
Block a user