From 84f3996f48d7a962685edfc09f12b8684cc76d93 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 10 Mar 2025 01:08:18 +0900
Subject: feat(frontend): enable Remix future flags

---
 frontend/app/entry.server.tsx | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

(limited to 'frontend/app/entry.server.tsx')

diff --git a/frontend/app/entry.server.tsx b/frontend/app/entry.server.tsx
index a1ffa99..6234421 100644
--- a/frontend/app/entry.server.tsx
+++ b/frontend/app/entry.server.tsx
@@ -6,7 +6,7 @@ import { RemixServer } from "@remix-run/react";
 import { isbot } from "isbot";
 import { renderToPipeableStream } from "react-dom/server";
 
-const ABORT_DELAY = 5_000;
+export const streamTimeout = 5000;
 
 export default function handleRequest(
 	request: Request,
@@ -38,11 +38,7 @@ function handleBotRequest(
 	return new Promise((resolve, reject) => {
 		let shellRendered = false;
 		const { pipe, abort } = renderToPipeableStream(
-			<RemixServer
-				context={remixContext}
-				url={request.url}
-				abortDelay={ABORT_DELAY}
-			/>,
+			<RemixServer context={remixContext} url={request.url} />,
 			{
 				onAllReady() {
 					shellRendered = true;
@@ -72,7 +68,7 @@ function handleBotRequest(
 			},
 		);
 
-		setTimeout(abort, ABORT_DELAY);
+		+setTimeout(abort, streamTimeout + 1000);
 	});
 }
 
@@ -85,11 +81,7 @@ function handleBrowserRequest(
 	return new Promise((resolve, reject) => {
 		let shellRendered = false;
 		const { pipe, abort } = renderToPipeableStream(
-			<RemixServer
-				context={remixContext}
-				url={request.url}
-				abortDelay={ABORT_DELAY}
-			/>,
+			<RemixServer context={remixContext} url={request.url} />,
 			{
 				onShellReady() {
 					shellRendered = true;
@@ -119,6 +111,6 @@ function handleBrowserRequest(
 			},
 		);
 
-		setTimeout(abort, ABORT_DELAY);
+		setTimeout(abort, streamTimeout + 1000);
 	});
 }
-- 
cgit v1.3.1

