-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededrefactoring
Description
Before You Submit
- I have searched for duplicate or closed issues
- I have read the contributing guidelines
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 = () => {
...
}Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededrefactoring