diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..cc3da93
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 2cad9fb..95314fd 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,32 +1,15 @@
-
-
-
-
+
+
+
-
+
-
+
\ No newline at end of file
diff --git a/.idea/scala_compiler.xml b/.idea/scala_compiler.xml
new file mode 100644
index 0000000..3c0e0f6
--- /dev/null
+++ b/.idea/scala_compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/web/src/app/(userland)/(contained)/types/device-types.tsx b/apps/web/src/app/(userland)/(contained)/types/device-types.tsx
index 56bdfed..b50954b 100644
--- a/apps/web/src/app/(userland)/(contained)/types/device-types.tsx
+++ b/apps/web/src/app/(userland)/(contained)/types/device-types.tsx
@@ -6,8 +6,10 @@ import {
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip.tsx";
-import "array.prototype.toreversed/auto";
-import "array.prototype.tosorted/auto";
+// import "array.prototype.toreversed/auto"; // cannot shim at compile time
+import shimReversed from "array.prototype.toreversed/shim";
+// import "array.prototype.tosorted/auto"; // cannot shim at compile time
+import shimSorted from "array.prototype.tosorted/shim";
import { ReactNode } from "react";
import { FaAndroid } from "react-icons/fa6";
import { LuCrown } from "react-icons/lu";
@@ -36,6 +38,8 @@ function PremiumButton() {
}
export default function DeviceTypes(): ReactNode {
+ shimSorted();
+ shimReversed();
return (
{allRedroidImages
diff --git a/apps/web/src/app/(userland)/devices/(root)/device-pages/user-devices.tsx b/apps/web/src/app/(userland)/devices/(root)/device-pages/user-devices.tsx
index 7b3d6dc..aaf1763 100644
--- a/apps/web/src/app/(userland)/devices/(root)/device-pages/user-devices.tsx
+++ b/apps/web/src/app/(userland)/devices/(root)/device-pages/user-devices.tsx
@@ -4,10 +4,13 @@ import NoDevicesCard from "@/app/(userland)/devices/(root)/device-pages/no-devic
import { getDevicesForUser } from "@/utils/devices.ts";
import { createClient } from "@/utils/supabase/server.ts";
import { Device } from "@prisma/client";
-import "array.prototype.tosorted/auto";
+// import "array.prototype.tosorted/auto"; // cannot shim at compile time
+import shimSorted from "array.prototype.tosorted/shim";
import NotFound from "next/dist/client/components/not-found-error";
export default async function UserDevices() {
+ shimSorted();
+
const supabaseClient = createClient();
const {
data: { user },
diff --git a/apps/web/src/array.prototype.toreversed.d.ts b/apps/web/src/array.prototype.toreversed.d.ts
index bcf3050..da65d1c 100644
--- a/apps/web/src/array.prototype.toreversed.d.ts
+++ b/apps/web/src/array.prototype.toreversed.d.ts
@@ -1 +1,11 @@
declare module "array.prototype.toreversed/auto";
+
+declare module "array.prototype.toreversed/polyfill" {
+ function getPolyfill(): Array.prototype.toReversed;
+ export = getPolyfill;
+}
+
+declare module "array.prototype.toreversed/shim" {
+ function shim(): void;
+ export = shim;
+}
diff --git a/apps/web/src/array.prototype.tosorted.d.ts b/apps/web/src/array.prototype.tosorted.d.ts
index b58ef03..b7639cd 100644
--- a/apps/web/src/array.prototype.tosorted.d.ts
+++ b/apps/web/src/array.prototype.tosorted.d.ts
@@ -1 +1,11 @@
declare module "array.prototype.tosorted/auto";
+
+declare module "array.prototype.tosorted/polyfill" {
+ function getPolyfill(): Array.prototype.toSorted;
+ export = getPolyfill;
+}
+
+declare module "array.prototype.tosorted/shim" {
+ function shim(): void;
+ export = shim;
+}