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

@ -10,7 +10,7 @@ const withHref = <Props extends Record<string, unknown>>(
return (
<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}>
<Component {...(others as unknown as Props)} />
</a>

Loading…
Cancel
Save