Skip to content

Commit

Permalink
provide named/default export and fixes the name
Browse files Browse the repository at this point in the history
  • Loading branch information
underfisk committed Aug 6, 2022
1 parent 647b3a5 commit b881635
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import throttle from "lodash.throttle";
* @param elementIds
* @returns the index of the selected id in the array
*/
export const useSimplyScrollSpy = (elementIds: string[]) => {
export const useSimpleScrollSpy = (elementIds: string[]) => {
const [activeSection, setActiveSection] = useState(() => {
const currentHash = location.hash;
const targetIndex = currentHash
Expand Down Expand Up @@ -68,3 +68,5 @@ export const useSimplyScrollSpy = (elementIds: string[]) => {

return activeSection;
};

export default useSimpleScrollSpy;

0 comments on commit b881635

Please sign in to comment.