mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): forwardRef in count down render (#4086)
This commit is contained in:
@@ -13,8 +13,12 @@ const formatTime = (time: number): string => {
|
||||
export const CountDownRender = forwardRef<
|
||||
HTMLDivElement,
|
||||
{ timeLeft: number } & HTMLAttributes<HTMLDivElement>
|
||||
>(({ timeLeft, ...props }) => {
|
||||
return <div {...props}>{formatTime(timeLeft)}</div>;
|
||||
>(({ timeLeft, ...props }, ref) => {
|
||||
return (
|
||||
<div {...props} ref={ref}>
|
||||
{formatTime(timeLeft)}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
CountDownRender.displayName = 'CountDownRender';
|
||||
|
||||
Reference in New Issue
Block a user