mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-10-23 00:19:23 +08:00
feat: redesign settings page
This commit is contained in:
@@ -2,7 +2,7 @@ import { RefObject, useState } from "react";
|
||||
import { useDebouncedCallback } from "use-debounce";
|
||||
|
||||
export interface Options {
|
||||
containerRef: RefObject<HTMLDivElement | null>;
|
||||
containerRef?: RefObject<HTMLElement | null>;
|
||||
delay?: number;
|
||||
offsetDistance?: number;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ interface Position {
|
||||
}
|
||||
|
||||
export default function useRelativePosition({
|
||||
containerRef,
|
||||
containerRef = { current: window.document.body },
|
||||
delay = 100,
|
||||
offsetDistance = 0,
|
||||
}: Options) {
|
||||
@@ -49,6 +49,7 @@ export default function useRelativePosition({
|
||||
width: targetW,
|
||||
height: targetH,
|
||||
} = target.getBoundingClientRect();
|
||||
|
||||
const {
|
||||
x: containerX,
|
||||
y: containerY,
|
||||
|
Reference in New Issue
Block a user