Shramkoweb/Portfolio

View on GitHub

Showing 30 of 89 total issues

Function handler has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default async function handler(
  req: NextApiRequest,
  res: NextApiResponse,
) {
  try {
Severity: Minor
Found in pages/api/views/[slug].ts - About 1 hr to fix

    Function Header has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    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">
    Severity: Minor
    Found in components/header/header.tsx - About 1 hr to fix

      Function NotFoundPage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function NotFoundPage() {
        useEffect(() => {
          // TODO refactor to some ErrorProvider
          Sentry.captureException(new Error('404'));
        }, []);
      Severity: Minor
      Found in pages/404.tsx - About 1 hr to fix

        Function DashboardCard has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        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}>
        Severity: Minor
        Found in components/dashboard-card/dashboard-card.tsx - About 1 hr to fix

          Function CustomLink has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function CustomLink(
            props: JSX.IntrinsicAttributes &
            ClassAttributes<HTMLAnchorElement> &
            AnchorHTMLAttributes<HTMLAnchorElement>,
          ) {
          Severity: Minor
          Found in components/mdx-components/index.tsx - About 1 hr to fix

            Function getSnippetBySlug has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export async function getSnippetBySlug(slug?: string): Promise<Snippet> {
              if (!slug) {
                throw new Error('getPostBySlug: slug is required');
              }
            
            
            Severity: Minor
            Found in lib/snippets/api.ts - About 1 hr to fix

              Function handler has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default async function handler(
                req: NextApiRequest,
                res: NextApiResponse,
              ) {
                try {
              Severity: Minor
              Found in pages/api/github.ts - About 1 hr to fix

                Function FacebookShare has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function FacebookShare() {
                  const handleClick = () => {
                    window.open(
                      `https://www.facebook.com/sharer/sharer.php?u=${window.location.href}&src=sdkpreparse`,
                      'facebook-share-dialog',
                Severity: Minor
                Found in components/share-button/facebook-share.tsx - About 1 hr to fix

                  Function Categories has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function Categories(props: CategoriesProps) {
                    const { categories } = props;
                  
                    return (
                      <ul className="flex flex-wrap gap-2 text-gray-600 dark:text-gray-400">
                  Severity: Minor
                  Found in components/categories/categories.tsx - About 1 hr to fix

                    Function MenuIcon has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function MenuIcon(props: IconProps) {
                      const { dataHide } = props;
                      return (
                        <svg
                          className="h-5 w-5 absolute text-gray-900 dark:text-gray-100"
                    Severity: Minor
                    Found in components/mobile-menu/icons.tsx - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language