Refactor function components across multiple files

Function components have been refactored across the codebase. Single export-const arrow function components have been adapted into traditional function declarations. This change provides better stack trace in case of errors and better function and argument names on runtime debugging.
This commit is contained in:
giancarlo
2024-05-05 13:31:40 +07:00
parent de15abb801
commit d7d3693f41
20 changed files with 144 additions and 88 deletions

View File

@@ -15,12 +15,14 @@ import {
} from '../shadcn/dropdown-menu';
import { Trans } from './trans';
const MobileNavigationDropdown: React.FC<{
function MobileNavigationDropdown({
links,
}: {
links: {
path: string;
label: string;
}[];
}> = ({ links }) => {
}) {
const path = usePathname();
const items = useMemo(
@@ -70,6 +72,6 @@ const MobileNavigationDropdown: React.FC<{
<DropdownMenuContent>{items}</DropdownMenuContent>
</DropdownMenu>
);
};
}
export default MobileNavigationDropdown;