import { h } from "../jsx.ts"; import watt, { watt as originalWatt } from "../wattpad.ts"; import { User } from "../wattpad.ts"; import { Context } from "../oak.ts"; import Base from "../templates/Base.tsx"; import FourOhFour from "./404.tsx"; export default async (params: URLSearchParams, ctx: Context) => { const name = params.get("name"); if (!name) { throw "deez"; } const user = new User(originalWatt.session, name); try { await user.init(); } catch { return FourOhFour(undefined, ctx); } return (

{user.displayName === "" ? user.username : user.displayName}

{user.displayName === "" ? undefined : user.username}

{user.description ? user.description.replaceAll("\n", "
") : undefined}

); };