Migrated ScrollToTop test to react testing library

This commit is contained in:
Alejandro Celaya
2022-05-06 20:13:51 +02:00
parent 37adcb52cf
commit d327142d00
4 changed files with 14 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
import { FC, PropsWithChildren, useEffect } from 'react';
import { useLocation } from 'react-router-dom';
const ScrollToTop = (): FC<PropsWithChildren<unknown>> => ({ children }) => {
export const ScrollToTop: FC<PropsWithChildren<unknown>> = ({ children }) => {
const location = useLocation();
useEffect(() => {
@@ -10,5 +10,3 @@ const ScrollToTop = (): FC<PropsWithChildren<unknown>> => ({ children }) => {
return <>{children}</>;
};
export default ScrollToTop;