Before You Submit
Describe the issue
In the useHeadings hook, the Heading interface was exported but not used anywhere outside the hook.
We can safely remove the export keyword.
Current:
import { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
const HEADING_H2 = 'H2';
const HEADING_H3 = 'H3';
const HEADING_DEFAULT_TITLE = 'Unknown';
export interface HeadingItem {
id: string;
title: string;
}
export interface Heading {
id: string;
title: string;
items: HeadingItem[];
}
export const useHeadings = () => {
...
}
After:
import { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
const HEADING_H2 = 'H2';
const HEADING_H3 = 'H3';
const HEADING_DEFAULT_TITLE = 'Unknown';
interface Heading {
id: string;
title: string;
items: HeadingItem[];
}
export interface HeadingItem {
id: string;
title: string;
}
export const useHeadings = () => {
...
}
Before You Submit
Describe the issue
In the useHeadings hook, the Heading interface was exported but not used anywhere outside the hook.
We can safely remove the export keyword.
Current:
After: