hunk.code_window:             type="error"
               shape="circle"
               style={{ marginLeft: '24px' }}
             >
               {t['Delete']()}
             </Button>
           </StyledButtonContent>
  
hunk.labels: keep replace keep keep keep keep keep
hunk.file_path: apps/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/delete/index.tsx
hunk.type: replace
file: import type { BlockHub } from '@blocksuite/blocks';
  import type { Atom } from 'jotai';
  import { useAtomValue } from 'jotai';
  import type { HTMLAttributes, ReactElement } from 'react';
  import { useEffect, useRef } from 'react';
  
  export interface BlockHubProps extends HTMLAttributes<HTMLDivElement> {
    blockHubAtom: Atom<Readonly<BlockHub> | null>;
  }
  
  export const BlockHubWrapper = (props: BlockHubProps): ReactElement => {
    const blockHub = useAtomValue(props.blockHubAtom);
    const ref = useRef<HTMLDivElement>(null);
    useEffect(() => {
      if (ref.current) {
        const div = ref.current;
        if (blockHub) {
          if (div.hasChildNodes()) {
            div.removeChild(div.firstChild as ChildNode);
          }
          div.appendChild(blockHub);
        }
      }
    }, [blockHub]);
    return <div ref={ref} data-testid="block-hub" />;
  };
  