[questions][ui] clean up old href

pull/346/head
wlren 3 years ago
parent 9c2625105a
commit 2680f7fec6

@ -15,7 +15,6 @@ type UpvoteProps =
export type FullQuestionCardProps = UpvoteProps & { export type FullQuestionCardProps = UpvoteProps & {
company: string; company: string;
content: string; content: string;
href?: string;
location: string; location: string;
receivedCount: number; receivedCount: number;
role: string; role: string;
@ -30,10 +29,9 @@ export default function FullQuestionCard({
timestamp, timestamp,
role, role,
location, location,
href,
}: FullQuestionCardProps) { }: FullQuestionCardProps) {
const altText = company + ' logo'; const altText = company + ' logo';
const mainCard = ( return (
<article className="flex gap-4 rounded-md border border-slate-300 bg-white p-4"> <article className="flex gap-4 rounded-md border border-slate-300 bg-white p-4">
{showVoteButtons && <VotingButtons upvoteCount={upvoteCount} />} {showVoteButtons && <VotingButtons upvoteCount={upvoteCount} />}
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
@ -56,13 +54,13 @@ export default function FullQuestionCard({
</article> </article>
); );
return href ? ( // Return href ? (
<a // <a
className="ring-primary-500 rounded-md hover:bg-slate-50 focus:ring-2 focus-visible:outline-none active:bg-slate-100" // className="ring-primary-500 rounded-md hover:bg-slate-50 focus:ring-2 focus-visible:outline-none active:bg-slate-100"
href={href}> // href={href}>
{mainCard} // {mainCard}
</a> // </a>
) : ( // ) : (
mainCard // mainCard
); // );
} }

@ -10,7 +10,7 @@ const withHref = <Props extends Record<string, unknown>>(
return ( return (
<a <a
className="ring-primary-500 rounded-md hover:bg-slate-50 focus:ring-2 focus-visible:outline-none active:bg-slate-100" className="ring-primary-500 rounded-md focus:ring-2 focus-visible:outline-none active:bg-slate-100"
href={href}> href={href}>
<Component {...(others as unknown as Props)} /> <Component {...(others as unknown as Props)} />
</a> </a>

Loading…
Cancel
Save