"use client"; import { Header, Group, ActionIcon, Text, Title } from "@mantine/core"; import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; import { useState } from "react"; export default function ComponentVote_HeaderTamplate({ hideBack, changeIconBack, route, route2, title, icon, bg, }: { hideBack?: boolean; changeIconBack?: any; route?: any; route2?: any; title: string; icon?: any; bg?: any; }) { const router = useRouter(); return ( <>
{hideBack ? ( ) : ( { if (route === null || route === undefined) { return router.back(); } else { return router.push(route); } }} > {changeIconBack ? changeIconBack : } )} {title} {(() => { if (route2 === null || route2 === undefined) { return ; } else { return ( router.push(route2)} > {icon} ); } })()}
); }