amirmoghi3.ir/components/GoBack/index.tsx

17 lines
432 B
TypeScript
Raw Normal View History

2022-02-28 14:06:38 +03:30
import { NextComponentType } from "next";
import { ArrowBack } from '@material-ui/icons';
import { useRouter } from "next/router";
const GoBack: NextComponentType = () => {
const router = useRouter()
return (
<button className="text-left p-3 border-0 " onClick={() => {
router.push("/")
}} >
<ArrowBack className="text-secondary" />
</button>
)
}
export default GoBack;