updated forms along with addg tabs
This commit is contained in:
@@ -4,25 +4,48 @@ import { useNavigate } from "react-router";
|
||||
|
||||
type NavigationArrowProps = {
|
||||
side: string;
|
||||
settingsPage?: boolean;
|
||||
};
|
||||
|
||||
const NavigationArrow = ({ side }: NavigationArrowProps) => {
|
||||
const NavigationArrow = ({ side, settingsPage }: NavigationArrowProps) => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const navigationDest = (side: string) => {
|
||||
if (side === "CameraFront") {
|
||||
navigate("/front-camera-settings");
|
||||
} else if (side === "Rear") {
|
||||
if (settingsPage) {
|
||||
navigate("/");
|
||||
return;
|
||||
}
|
||||
|
||||
if (side === "TargetDetectionFront") {
|
||||
navigate("/front-camera-settings");
|
||||
} else if (side === "TargetDetectionRear") {
|
||||
navigate("/Rear-Camera-settings");
|
||||
} else {
|
||||
navigate("/");
|
||||
}
|
||||
};
|
||||
|
||||
if (settingsPage) {
|
||||
return (
|
||||
<>
|
||||
{side === "TargetDetectionFront" ? (
|
||||
<FontAwesomeIcon
|
||||
icon={faArrowRight}
|
||||
className="absolute top-[50%] right-[2%] backdrop-blur-md hover:cursor-pointer animate-bounce"
|
||||
onClick={() => navigationDest(side)}
|
||||
/>
|
||||
) : (
|
||||
<FontAwesomeIcon
|
||||
icon={faArrowLeft}
|
||||
className="absolute top-[50%] left-[2%] backdrop-blur-md hover:cursor-pointer animate-bounce"
|
||||
onClick={() => navigationDest(side)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{side === "CameraFront" || side === "Rear" ? (
|
||||
{side === "TargetDetectionFront" ? (
|
||||
<FontAwesomeIcon
|
||||
icon={faArrowLeft}
|
||||
className="absolute top-[50%] left-[2%] backdrop-blur-md hover:cursor-pointer animate-bounce"
|
||||
|
||||
Reference in New Issue
Block a user