File tree Expand file tree Collapse file tree 7 files changed +15
-31
lines changed
Expand file tree Collapse file tree 7 files changed +15
-31
lines changed Original file line number Diff line number Diff line change 11"use client" ;
22
3- import { Children , Fragment , useEffect } from "react" ;
3+ import { Fragment , useEffect } from "react" ;
44import { TagIcon } from "@heroicons/react/20/solid" ;
55import ArticlePreview from "@/components/ArticlePreview/ArticlePreview" ;
66import ArticleLoading from "@/components/ArticlePreview/ArticleLoading" ;
@@ -105,11 +105,7 @@ const ArticlesPage = () => {
105105 </ div >
106106 ) }
107107 { status === "pending" &&
108- Children . toArray (
109- Array . from ( { length : 7 } , ( ) => {
110- return < ArticleLoading /> ;
111- } ) ,
112- ) }
108+ Array . from ( { length : 7 } , ( _ , i ) => < ArticleLoading key = { i } /> ) }
113109 { status === "success" &&
114110 data . pages . map ( ( page ) => {
115111 return (
Original file line number Diff line number Diff line change 11"use client" ;
22
3- import { Children , Fragment , useEffect } from "react" ;
3+ import { Fragment , useEffect } from "react" ;
44import { useInView } from "react-intersection-observer" ;
55import { CheckCircleIcon } from "@heroicons/react/20/solid" ;
66import { Temporal } from "@js-temporal/polyfill" ;
@@ -91,11 +91,7 @@ const Notifications = () => {
9191 < div > Something went wrong... Please refresh your page.</ div >
9292 ) }
9393 { status === "pending" &&
94- Children . toArray (
95- Array . from ( { length : 7 } , ( ) => {
96- return < Placeholder /> ;
97- } ) ,
98- ) }
94+ Array . from ( { length : 7 } , ( _ , i ) => < Placeholder key = { i } /> ) }
9995 { status !== "pending" && noNotifications && (
10096 < p className = "text-lg font-semibold text-neutral-900 dark:text-neutral-50" >
10197 No new notifications. ✅{ " " }
Original file line number Diff line number Diff line change 11"use client" ;
22
3- import { Children } from "react" ;
43import ArticlePreview from "@/components/ArticlePreview/ArticlePreview" ;
54import { api } from "@/server/trpc/react" ;
65import PageHeading from "@/components/PageHeading/PageHeading" ;
@@ -33,11 +32,7 @@ const SavedPosts = () => {
3332 < PageHeading > Saved items</ PageHeading >
3433 < div >
3534 { bookmarkStatus === "pending" &&
36- Children . toArray (
37- Array . from ( { length : 7 } , ( ) => {
38- return < ArticleLoading /> ;
39- } ) ,
40- ) }
35+ Array . from ( { length : 7 } , ( _ , i ) => < ArticleLoading key = { i } /> ) }
4136 { bookmarkStatus === "error" && (
4237 < p className = "py-4 font-medium" >
4338 Something went wrong fetching your saved posts... Refresh the page.
Original file line number Diff line number Diff line change 11"use client" ;
22import { api } from "@/server/trpc/react" ;
3- import React , { Children } from "react" ;
3+ import React from "react" ;
44
55import SideBarSavedArticlePreview from "./SideBarSavedArticlePreview" ;
66import Link from "next/link" ;
@@ -22,11 +22,9 @@ export default React.memo(function SideBarSavedPosts() {
2222 </ h3 >
2323 < div className = "w-full" >
2424 { bookmarkStatus === "pending" &&
25- Children . toArray (
26- Array . from ( { length : howManySavedToShow } , ( ) => {
27- return < LoadingSkeleton /> ;
28- } ) ,
29- ) }
25+ Array . from ( { length : howManySavedToShow } , ( _ , i ) => (
26+ < LoadingSkeleton key = { i } />
27+ ) ) }
3028 { bookmarkStatus === "error" && (
3129 < p className = "py-4 font-medium" >
3230 Something went wrong fetching your saved posts... Refresh the page.
Original file line number Diff line number Diff line change 1- import { Children } from "react" ;
21import ArticleLoading from "@/components/ArticlePreview/ArticleLoading" ;
32
43function LoadingTrendingPosts ( ) {
54 return (
65 < div >
7- { Children . toArray (
8- Array . from ( { length : 5 } , ( ) => {
9- return < ArticleLoading /> ;
10- } ) ,
11- ) }
6+ { Array . from ( { length : 5 } , ( _ , i ) => (
7+ < ArticleLoading key = { i } />
8+ ) ) }
129 </ div >
1310 ) ;
1411}
Original file line number Diff line number Diff line change 11/// <reference types="next" />
22/// <reference types="next/image-types/global" />
3- import "./.next/types/routes.d.ts" ;
3+ import "./.next/dev/ types/routes.d.ts" ;
44
55// NOTE: This file should not be edited
66// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ const REMOTE_PATTERNS = [
2020} ) ) ;
2121
2222const config = {
23+ // Exclude jsdom and isomorphic-dompurify from bundling to fix ESM/CJS compatibility
24+ serverExternalPackages : [ "jsdom" , "isomorphic-dompurify" ] ,
2325 // Turbopack configuration for SVGR (replaces webpack config)
2426 turbopack : {
2527 rules : {
You can’t perform that action at this time.
0 commit comments