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