Showing 30 of 89 total issues
Function handler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
try {
Function Header
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Header() {
return (
<header className="flex flex-col justify-center px-8" role="banner">
<nav role="navigation" className="relative mx-auto flex w-full max-w-3xl items-center justify-between border-gray-200 bg-gray-50 bg-opacity-60 pt-8 pb-8 text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 sm:pb-16">
<a href="#skip" className="skip-nav">
Function NotFoundPage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function NotFoundPage() {
useEffect(() => {
// TODO refactor to some ErrorProvider
Sentry.captureException(new Error('404'));
}, []);
Function DashboardCard
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function DashboardCard(props: DashboardCardProps) {
const { header, link, metric } = props;
return (
<a className="flex max-w-72" target="_blank" rel="noopener" href={link} aria-label={header}>
Function CustomLink
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CustomLink(
props: JSX.IntrinsicAttributes &
ClassAttributes<HTMLAnchorElement> &
AnchorHTMLAttributes<HTMLAnchorElement>,
) {
Function getSnippetBySlug
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function getSnippetBySlug(slug?: string): Promise<Snippet> {
if (!slug) {
throw new Error('getPostBySlug: slug is required');
}
Function handler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
try {
Function FacebookShare
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function FacebookShare() {
const handleClick = () => {
window.open(
`https://www.facebook.com/sharer/sharer.php?u=${window.location.href}&src=sdkpreparse`,
'facebook-share-dialog',
Function Categories
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Categories(props: CategoriesProps) {
const { categories } = props;
return (
<ul className="flex flex-wrap gap-2 text-gray-600 dark:text-gray-400">
Function MenuIcon
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function MenuIcon(props: IconProps) {
const { dataHide } = props;
return (
<svg
className="h-5 w-5 absolute text-gray-900 dark:text-gray-100"