From 0b48e7272d85ffabdaf4aac01e240e71c98c09b2 Mon Sep 17 00:00:00 2001
From: Jack Hanford <jackhanford@gmail.com>
Date: Wed, 10 Nov 2021 14:53:48 -0800
Subject: remove a bunch of dead code / unused variables

---
 packages/bun-framework-next/renderDocument.tsx | 30 +-------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

(limited to 'packages/bun-framework-next/renderDocument.tsx')

diff --git a/packages/bun-framework-next/renderDocument.tsx b/packages/bun-framework-next/renderDocument.tsx
index 615224f0d..59e18fbe7 100644
--- a/packages/bun-framework-next/renderDocument.tsx
+++ b/packages/bun-framework-next/renderDocument.tsx
@@ -20,7 +20,6 @@ import {
 } from "next/dist/shared/lib/utils";
 import * as NextDocument from "next/document";
 import * as ReactDOMServer from "react-dom/server.browser";
-import * as url from "url";
 import * as React from "react";
 import * as ReactIs from "react-is";
 import { BODY_RENDER_TARGET } from "next/constants";
@@ -78,8 +77,8 @@ function getScripts(files: DocumentFiles) {
     buildManifest,
     isDevelopment,
     devOnlyCacheBusterQueryString,
-    disableOptimizedLoading,
   } = context;
+
   const normalScripts = files.allFiles.filter(isJSFile);
   const lowPriorityScripts = buildManifest.lowPriorityFiles?.filter(isJSFile);
 
@@ -97,33 +96,6 @@ function getScripts(files: DocumentFiles) {
   });
 }
 
-// function fixLink(from: string) {
-//   if (from.startsWith("/_next/http://") || from.startsWith("/_next/https://"))
-//     return from.substring("/_next".length);
-//   return from;
-// }
-
-// function cloneWithOverwrittenLink(element: React.ReactElement<any>) {
-//   const props = { ...element.props };
-//   if ("href" in element.props) {
-//     props.href = fixLink(props.href);
-//   }
-
-//   if ("n-href" in element.props) {
-//     props["n-href"] = fixLink(props["n-href"]);
-//   }
-
-//   if ("n-src" in element.props) {
-//     props["n-src"] = fixLink(props["n-src"]);
-//   }
-
-//   if ("src" in element.props) {
-//     props["src"] = fixLink(props.src);
-//   }
-
-//   return React.cloneElement(element, props);
-// }
-
 interface DomainLocale {
   defaultLocale: string;
   domain: string;
-- 
cgit v1.2.3

