Skip to content

Commit a54482f

Browse files
✨(frontend) remove import circular dependencies
- Deleted `DocToolBoxLicenceAGPL` and `DocToolBoxLicenceMIT` components to streamline the codebase. - Removed the `index.ts` file from the `docs` feature as it was no longer needed. - Updated import paths for `Doc` in various files to reflect the new structure under `doc-management`. - Enhanced `DocToolBox` to include `isRootDoc` prop for improved document handling.
1 parent 8f3b6ee commit a54482f

File tree

16 files changed

+17
-385
lines changed

16 files changed

+17
-385
lines changed

src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBox.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ export const DocToolBox = ({ doc }: DocToolBoxProps) => {
277277
</Box>
278278

279279
{modalShare.isOpen && (
280-
<DocShareModal onClose={() => modalShare.close()} doc={doc} />
280+
<DocShareModal
281+
onClose={() => modalShare.close()}
282+
doc={doc}
283+
isRootDoc={treeContext?.root?.id === doc.id}
284+
/>
281285
)}
282286
{isModalExportOpen && ModalExport && (
283287
<ModalExport onClose={() => setIsModalExportOpen(false)} doc={doc} />

src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBoxLicenceAGPL.tsx

Lines changed: 0 additions & 198 deletions
This file was deleted.

src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBoxLicenceMIT.tsx

Lines changed: 0 additions & 171 deletions
This file was deleted.

src/frontend/apps/impress/src/features/docs/doc-management/api/useCreateFavoriteDoc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useMutation, useQueryClient } from '@tanstack/react-query';
22

33
import { APIError, errorCauses, fetchAPI } from '@/api';
4-
import { Doc } from '@/features/docs';
4+
import { Doc } from '@/features/docs/doc-management';
55

66
export type CreateFavoriteDocParams = Pick<Doc, 'id'>;
77

0 commit comments

Comments
 (0)