mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
fix(core): resolve unexpected forwardRef warning (#7527)
This commit is contained in:
@@ -186,13 +186,17 @@ export const ViewSidebarTab = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const ViewSidebarTabIconTarget = forwardRef(
|
export const ViewSidebarTabIconTarget = forwardRef(
|
||||||
function ViewSidebarTabIconTarget({
|
function ViewSidebarTabIconTarget(
|
||||||
viewId,
|
{
|
||||||
tabId,
|
viewId,
|
||||||
...otherProps
|
tabId,
|
||||||
}: React.HTMLProps<HTMLDivElement> & { tabId: string; viewId: string }) {
|
...otherProps
|
||||||
|
}: React.HTMLProps<HTMLDivElement> & { tabId: string; viewId: string },
|
||||||
|
ref: Ref<HTMLDivElement>
|
||||||
|
) {
|
||||||
return (
|
return (
|
||||||
<ViewIslandTarget
|
<ViewIslandTarget
|
||||||
|
ref={ref}
|
||||||
id={`${viewId}:sidebar:${tabId}:icon`}
|
id={`${viewId}:sidebar:${tabId}:icon`}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
/>
|
/>
|
||||||
@@ -201,16 +205,20 @@ export const ViewSidebarTabIconTarget = forwardRef(
|
|||||||
);
|
);
|
||||||
|
|
||||||
export const ViewSidebarTabBodyTarget = forwardRef(
|
export const ViewSidebarTabBodyTarget = forwardRef(
|
||||||
function ViewSidebarTabBodyTarget({
|
function ViewSidebarTabBodyTarget(
|
||||||
viewId,
|
{
|
||||||
tabId,
|
viewId,
|
||||||
...otherProps
|
tabId,
|
||||||
}: React.HTMLProps<HTMLDivElement> & {
|
...otherProps
|
||||||
tabId: string;
|
}: React.HTMLProps<HTMLDivElement> & {
|
||||||
viewId: string;
|
tabId: string;
|
||||||
}) {
|
viewId: string;
|
||||||
|
},
|
||||||
|
ref: Ref<HTMLDivElement>
|
||||||
|
) {
|
||||||
return (
|
return (
|
||||||
<ViewIslandTarget
|
<ViewIslandTarget
|
||||||
|
ref={ref}
|
||||||
id={`${viewId}:sidebar:${tabId}:body`}
|
id={`${viewId}:sidebar:${tabId}:body`}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user