Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions react-compiler.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ export const REACT_COMPILER_ENABLED_DIRS = [
"src/components/shared/ExecutionDetails",
"src/components/shared/QuickStart",
"src/components/shared/Status",

// 2-5 useCallback/useMemo
"src/components/shared/CodeViewer", // 2
"src/components/shared/FullscreenElement", // 2
"src/components/shared/CopyText", // 3
"src/components/shared/TaskDetails", // 4
"src/components/shared/GitHubAuth", // 5
"src/components/shared/CodeViewer",
"src/components/shared/FullscreenElement",
"src/components/shared/CopyText",
"src/components/shared/TaskDetails",
"src/components/shared/GitHubAuth",
"src/components/shared/Authentication",
"src/routes",

// 6-10 useCallback/useMemo
// "src/routes", // 6
// "src/components/shared/ComponentEditor", // 6
// "src/components/shared/Settings", // 6
// "src/components/shared/HuggingFaceAuth", // 8
"src/components/shared/Authentication", // 9

// "src/components/shared/GitHubLibrary", // 9

// 11-20 useCallback/useMemo
Expand Down
12 changes: 5 additions & 7 deletions src/routes/ErrorPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { useRouter } from "@tanstack/react-router";
import { type ErrorComponentProps } from "@tanstack/react-router";
import { useCallback } from "react";
import { type ErrorComponentProps, useRouter } from "@tanstack/react-router";

import { InfoBox } from "@/components/shared/InfoBox";
import { Button } from "@/components/ui/button";
Expand All @@ -10,13 +8,13 @@ import { Paragraph, Text } from "@/components/ui/typography";
export default function ErrorPage({ error }: ErrorComponentProps) {
const router = useRouter();

const handleRefresh = useCallback(() => {
const handleRefresh = () => {
window.location.reload();
}, []);
};

const handleGoHome = useCallback(() => {
const handleGoHome = () => {
router.navigate({ to: "/" });
}, [router]);
};

return (
<div className="min-h-screen flex items-center justify-center bg-background p-4">
Expand Down
9 changes: 4 additions & 5 deletions src/routes/NotFoundPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useRouter } from "@tanstack/react-router";
import { useCallback } from "react";

import { Button } from "@/components/ui/button";
import { BlockStack } from "@/components/ui/layout";
Expand All @@ -8,13 +7,13 @@ import { Paragraph, Text } from "@/components/ui/typography";
export default function NotFoundPage() {
const router = useRouter();

const handleGoHome = useCallback(() => {
const handleGoHome = () => {
router.navigate({ to: "/" });
}, [router]);
};

const handleGoBack = useCallback(() => {
const handleGoBack = () => {
router.history.back();
}, [router]);
};

return (
<div className="min-h-screen flex items-center justify-center bg-background p-4">
Expand Down