hunk.code_window: import { useService } from '@toeverything/infra/di';
   import { useAtom, useAtomValue, useSetAtom } from 'jotai';
   import type { PropsWithChildren, ReactNode } from 'react';
   import { lazy, Suspense, useCallback, useEffect, useState } from 'react';
   import { useParams } from 'react-router-dom';
   import { Map as YMap } from 'yjs';
   import { openQuickSearchModalAtom, openSettingModalAtom } from '../atoms';
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit: import { matchPath, useParams } from 'react-router-dom';
  
hunk.file_path: packages/frontend/core/src/layouts/workspace-layout.tsx
hunk.type: replace
file: // eslint-disable-next-line @typescript-eslint/no-restricted-imports
  import { useSession } from 'next-auth/react';
  import { useMemo } from 'react';
  
  export const useDeleteCollectionInfo = () => {
    const user = useSession().data?.user;
    return useMemo(
      () => (user ? { userName: user.name ?? '', userId: user.id } : null),
      [user]
    );
  };
  