diff --git a/frontend/src/components/gdpr/gdprbanner.tsx b/frontend/src/components/gdpr/gdprbanner.tsx index 0790d01f..05736898 100644 --- a/frontend/src/components/gdpr/gdprbanner.tsx +++ b/frontend/src/components/gdpr/gdprbanner.tsx @@ -129,7 +129,7 @@ const GDPRBanner: React.FC = () => { Back - - - {/* Creator button */}
); diff --git a/frontend/src/components/listing/ListingName.tsx b/frontend/src/components/listing/ListingName.tsx index 96bcbaac..f6d0ec5d 100644 --- a/frontend/src/components/listing/ListingName.tsx +++ b/frontend/src/components/listing/ListingName.tsx @@ -4,14 +4,17 @@ import { FaPencilAlt, FaSave, FaTimes } from "react-icons/fa"; import { useAlertQueue } from "@/hooks/useAlertQueue"; import { useAuthentication } from "@/hooks/useAuth"; +import ListingVote from "./ListingVote"; + interface Props { listingId: string; name: string; edit: boolean; + userVote: boolean | null; } const ListingName = (props: Props) => { - const { listingId, name: initialName, edit } = props; + const { listingId, name: initialName, edit, userVote } = props; const auth = useAuthentication(); const { addAlert, addErrorAlert } = useAlertQueue(); @@ -60,7 +63,7 @@ const ListingName = (props: Props) => { type="text" value={newName} onChange={handleChange} - className="border rounded px-2 py-1" + className="border rounded px-2 py-1 bg-black text-white" disabled={submitting} /> + + + ); +}; + +export default ListingVote; diff --git a/frontend/src/components/nav/Navbar.tsx b/frontend/src/components/nav/Navbar.tsx index 31540600..703e2cd7 100644 --- a/frontend/src/components/nav/Navbar.tsx +++ b/frontend/src/components/nav/Navbar.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; +import { FaExternalLinkAlt } from "react-icons/fa"; import { FaBars } from "react-icons/fa6"; import { Link, useLocation, useNavigate } from "react-router-dom"; @@ -75,8 +76,10 @@ const Navbar = () => { href={item.path} target="_blank" rel="noopener noreferrer" + className="flex items-center gap-2" > {item.name} + ) : ( diff --git a/frontend/src/components/nav/Sidebar.tsx b/frontend/src/components/nav/Sidebar.tsx index bbb9ba67..739b9262 100644 --- a/frontend/src/components/nav/Sidebar.tsx +++ b/frontend/src/components/nav/Sidebar.tsx @@ -1,4 +1,4 @@ -import { FaTimes } from "react-icons/fa"; +import { FaExternalLinkAlt, FaTimes } from "react-icons/fa"; import { useNavigate } from "react-router-dom"; import Logo from "@/components/Logo"; @@ -11,6 +11,7 @@ interface SidebarItemProps { title: string; icon?: JSX.Element; onClick: () => void; + isExternal?: boolean; } interface SidebarProps { @@ -18,14 +19,22 @@ interface SidebarProps { onClose: () => void; } -const SidebarItem = ({ icon, title, onClick }: SidebarItemProps) => ( +const SidebarItem = ({ + icon, + title, + onClick, + isExternal, +}: SidebarItemProps) => (
  • ); @@ -72,7 +81,7 @@ const Sidebar = ({ show, onClose }: SidebarProps) => { title={listing.name} onClick={() => handleItemClick( - `/item/${listing.username}/${listing.slug || listing.id}`, + `/bot/${listing.username}/${listing.slug || listing.id}`, ) } /> @@ -86,7 +95,10 @@ const Sidebar = ({ show, onClose }: SidebarProps) => { key={item.name} title={item.name} icon={item.icon} - onClick={() => handleItemClick(item.path)} + onClick={() => + handleItemClick(item.path, item.isExternal) + } + isExternal={item.isExternal} /> ))}