import React from "react"; import { FaArrowRight } from "react-icons/fa"; export const RedirectItem = ({ source, destination, permanent }) => { const displaySource = displayPath(source); const displayDestination = displayPath(destination); return (
{displaySource} {displayDestination}
{permanent ? "permanent" : "temporary"}
); }; const displayPath = (path) => { if (!path) return ""; if (path.replace("/", "").length === 0) return "home"; return path.replace("/", ""); };