aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/hooks')
-rw-r--r--src/utils/hooks/useHeadingsTree.tsx8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/utils/hooks/useHeadingsTree.tsx b/src/utils/hooks/useHeadingsTree.tsx
index 8bb70c8..94d3b4b 100644
--- a/src/utils/hooks/useHeadingsTree.tsx
+++ b/src/utils/hooks/useHeadingsTree.tsx
@@ -1,13 +1,7 @@
+import { Heading } from '@ts/types/app';
import { slugify } from '@utils/helpers/slugify';
import { useCallback, useEffect, useMemo, useState } from 'react';
-type Heading = {
- depth: number;
- id: string;
- children: Heading[];
- title: string;
-};
-
const useHeadingsTree = (wrapper: string) => {
const [headingsTree, setHeadingsTree] = useState<Heading[]>([]);
const depths = useMemo(() => ['h2', 'h3', 'h4', 'h5', 'h6'], []);