Skip to content

Commit

Permalink
fix: remove dynamic imports, causing memory leaks in current next ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
Mirasaki committed Nov 7, 2024
1 parent f05e600 commit 710dce0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import MainHero from '@/components/heros/main-hero';
import AboutSection from '@/sections/about-section';
import ServerNetworkSection from '@/sections/server-network-section';
import { config } from '../../config';
import dynamic from 'next/dynamic';
import { LeaderboardEntry, getServerLeaderboards } from '@/lib/cftools';
import ContactSection from '@/sections/contact-section';

// Lazy load chonky leaderboard section
const LeaderboardSection = dynamic(() => import('@/sections/leaderboard-section'));
import LeaderboardSection from '@/sections/leaderboard-section';

export default async function Home() {
let data = config.cftools.leaderboard.enabled ? await getServerLeaderboards() : {};
Expand Down

0 comments on commit 710dce0

Please sign in to comment.