import React from "react";
import { safeHref } from "../../utils/helpers";
export default function Author({ url, avatar, name, variant = "grid" }) {
const isListView = variant === "list";
// Provider author URLs are untrusted, and favourites replay them from
// localStorage, so anything that is not http(s) renders as plain text.
const href = safeHref(url);
const className = `flex items-center gap-2.5 no-underline text-base font-medium min-w-0 ${
isListView ? "text-gray-600 mt-1" : "text-white mt-3"
}`;
const content = (
<>
{name}
>
);
if (!href) {
return {content};
}
return (
{content}
);
}