import ChevronIcon from "@Assets/Icons/chevron.svg"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import { NextRouter, useRouter } from "next/router"; import React from "react"; type IProps = { url?: string; }; type IPropsClass = IProps & { router: NextRouter; }; type IState = {}; class BackArrowClass extends React.Component { public constructor(props: IPropsClass) { super(props); this.handleClick = this.handleClick.bind(this); } public override render(): JSX.Element { return ( ); } private handleClick() { if (this.props.url) { this.props.router.push(this.props.url); } this.props.router.back(); } } export default function BackArrow(props: IProps) { const router = useRouter(); return ; }