chore: remove faker-js dependency

This commit is contained in:
Aarnav Tale
2026-04-09 21:57:46 -04:00
parent 0f19fdf0da
commit a0b2077c7b
3 changed files with 2 additions and 14 deletions
+2 -4
View File
@@ -1,4 +1,3 @@
import { faker } from "@faker-js/faker";
import { Loader2, WifiOff } from "lucide-react";
import { useEffect, useState } from "react";
import { data, isRouteErrorResponse, type ShouldRevalidateFunction } from "react-router";
@@ -99,9 +98,8 @@ export async function loader({ request, params, context }: Route.LoaderArgs) {
}
function generateHostname(username: string) {
const adjective = faker.word.adjective({ length: { min: 3, max: 6 } });
const noun = faker.word.noun({ length: { min: 3, max: 6 } });
return `ssh-${adjective}-${noun}-${username}`;
const hex = crypto.randomUUID().replace(/-/g, "").slice(0, 8);
return `ssh-${hex}-${username}`;
}
export const links: Route.LinksFunction = () => [