Showing 30 of 89 total issues
Function AboutPage
has 369 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AboutPage() {
return (
<>
<Head>
<title>About | Serhii Shramko</title>
Function QuizletPage
has 267 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function QuizletPage() {
return (
<>
<Head>
<title>Quizlet QuickList - Chrome Extension</title>
Function ArticlePage
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ArticlePage(props: ArticlePageProps) {
const {
content,
data: {
title,
Function PrivacyPolicy
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PrivacyPolicy() {
return (
<>
<Head>
<title>Privacy Policy | Quizlet QuickList Chrome Extension</title>
Function IndexPage
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function IndexPage(props: IndexPageProps) {
const { featuredPosts, otherPosts } = props;
const [isAvatarHovered, setIsAvatarHovered] = useState(false);
Function GearPage
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function GearPage() {
return (
<>
<Head>
<title>Gear | Serhii Shramko</title>
File about.tsx
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import Head from 'next/head';
import Image from 'next/image';
import about from '../public/static/images/about.jpeg';
import aboutBottom from '../public/static/images/about-bottom.png';
Function BlogPage
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function BlogPage(props: BlogPageProps) {
const { posts, categories } = props;
const postsLength = posts.length;
const [searchValue, setSearchValue] = useState('');
Function CategoryPage
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CategoryPage(props: CategoryPageProps) {
const {
posts, categories, category, seoDescription, seoKeywords, seoTitle,
} = props;
const postsLength = posts.length;
Function SnippetPage
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SnippetPage(props: SnippetPageProps) {
const {
content,
slug,
data: {
Function Footer
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Footer() {
return (
<footer role="contentinfo" className="mx-auto flex w-full max-w-3xl flex-col items-start justify-center">
<hr className="mb-8 w-full border-gray-200 border-1 dark:border-gray-800" />
<div className="grid w-full max-w-3xl grid-cols-1 gap-4 pb-12 sm:grid-cols-3">
Function MobileMenu
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function MobileMenu() {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const router = useRouter();
useEffect(() => {
File index.tsx
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import Head from 'next/head';
import Image from 'next/image';
import Link from 'next/link';
import firstImage from '../../public/static/images/quizlet-list/quizlet-quicklist-1.png';
Function PostReaction
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function PostReaction() {
const { state, actions } = useFeedbackReducer();
const isReactionUntouched = state.feedback === Feedback.Blank;
const handleYesClick = () => {
Function Dashboard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Dashboard() {
return (
<>
<Head>
<title>Dashboard | Serhii Shramko</title>
Function SnippetsPage
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SnippetsPage(props: SnippetsPageProps) {
const { snippets } = props;
return (
<>
Function Document
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Document() {
const { serverRuntimeConfig } = getConfig();
return (
<Html lang="en" data-relese={serverRuntimeConfig.appReleaseVersion}>
Function BlogPostSquarePreview
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function BlogPostSquarePreview(props: BlogPostPreviewProps) {
const { heading, slug, classNames } = props;
const { data } = useSWR<Views>(`/api/views/${slug}`, fetcher);
const views = data?.total;
Function ThemeChanger
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ThemeChanger() {
const [mounted, setMounted] = useState(false);
const { resolvedTheme, setTheme } = useTheme();
useEffect(() => setMounted(true), []);
Function getPostBySlug
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function getPostBySlug(slug?: string): Promise<Post> {
if (!slug) {
throw new Error('getPostBySlug: slug is required');
}