Skip to content

Commit

Permalink
Remove logic to force client-side render
Browse files Browse the repository at this point in the history
  • Loading branch information
malte-laukoetter committed Dec 19, 2023
1 parent e37aae9 commit 02d0714
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
File renamed without changes.
18 changes: 7 additions & 11 deletions app/routes/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type MetaFunction,
} from "@remix-run/node";
import { Form, useLoaderData } from "@remix-run/react";
import Troi from "../components/troi.client";
import Troi from "../components/troi";
import { useEffect, useState } from "react";
import {
getCalculationPositions,
Expand Down Expand Up @@ -106,16 +106,12 @@ export default function Index() {
</div>
</div>
</nav>
{/* render client side only */}
{/* https://remix.run/docs/en/main/guides/migrating-react-router-app#client-only-components */}
{isHydrated && (
<Troi
calendarEvents={calendarEvents}
timeEntries={timeEntries}
calculationPositions={calculationPositions}
tasks={tasks}
/>
)}
<Troi
calendarEvents={calendarEvents}
timeEntries={timeEntries}
calculationPositions={calculationPositions}
tasks={tasks}
/>
</div>
</main>
);
Expand Down

0 comments on commit 02d0714

Please sign in to comment.