Enhance application performance and user experience by enabling component caching in next.config.ts, optimizing database queries in various pages, and implementing lazy loading for heavy components. Updated styles for smoother transitions and improved visual clarity in multiple components, including globals.css and landing sections.
All checks were successful
Deploy / deploy (push) Successful in 2m30s
All checks were successful
Deploy / deploy (push) Successful in 2m30s
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import React, { useEffect, useState } from "react"
|
||||
import { codeToHtml } from "shiki"
|
||||
|
||||
export type CodeBlockProps = {
|
||||
children?: React.ReactNode
|
||||
@@ -47,6 +46,9 @@ function CodeBlockCode({
|
||||
return
|
||||
}
|
||||
|
||||
// Shiki ~380 KB: yalnızca gerçekten bir kod bloğu çizilirken indir;
|
||||
// o ana dek aşağıdaki düz <pre> fallback'i görünür.
|
||||
const { codeToHtml } = await import("shiki")
|
||||
const html = await codeToHtml(code, { lang: language, theme })
|
||||
setHighlightedHtml(html)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user