Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(web): defer Shiki highlighter loading on task page

(justin)randoneeringc310a9196d61
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId_.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId_.tsx
index ec0f0d642..19e0c9654 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId_.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId_.tsx
@@ -14,7 +14,6 @@ import { Button } from "@/components/ui/button";
import useGetActivitiesByTaskId from "@/hooks/queries/activity/use-get-activities-by-task-id";
import useGetProject from "@/hooks/queries/project/use-get-project";
import useGetTask from "@/hooks/queries/task/use-get-task";
-import { getSharedShikiHighlighter } from "@/lib/shiki-highlighter";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId_",
@@ -40,7 +39,8 @@ function RouteComponent() {
useEffect(() => {
let mounted = true;
- void getSharedShikiHighlighter()
+ void import("@/lib/shiki-highlighter")
+ .then(({ getSharedShikiHighlighter }) => getSharedShikiHighlighter())
.then(() => {
if (!mounted) return;
setIsShikiReady(true);