"use client"; import { useRobuxBalance } from "@/hooks/roblox/useRobuxBalance"; import { RobuxIcon } from "../roblox/RobloxIcons"; import React, { useState } from "react"; import { Separator } from "../ui/separator"; import { Bell, SettingsIcon, ShirtIcon } from "lucide-react"; import { StupidHoverThing } from "../util/MiscStuff"; import { toast } from "sonner"; import { OutfitSelector } from "./OutfitQuickChooser"; import { proxyFetch } from "@/lib/utils"; import { loadThumbnails } from "@/lib/thumbnailLoader"; import Link from "next/link"; import { useFriendsHome } from "@/hooks/roblox/useFriends"; import { useBestFriends } from "@/hooks/roblox/useBestFriends"; import { useCurrentAccount } from "@/hooks/roblox/useCurrentAccount"; import { useFriendsPresence } from "@/hooks/roblox/usePresence"; /** requires csrf token cuz u cant use noblox.js on the web either go to https://roblox.com/my/avataar or the app to change ur fit */ async function updateOutfit(outfit: { id: number }, acc: { id: number }) { try { const J = (await ( await proxyFetch( `https://avatar.roblox.com/v3/outfits/${outfit.id}/details` ) ).json()) as { id: number; name: string; assets: any[]; }; await proxyFetch( `https://avatar.roblox.com/v1/avatar/set-wearing-assets`, { method: "POST", body: JSON.stringify({ assetIds: J.assets.map((a) => a.id).filter((a) => !!a) }) } ); loadThumbnails([ { type: "AvatarHeadShot", targetId: acc.id, format: "webp", size: "720x720" } ]).catch((a) => {}); } catch {} } export const QuickTopUI = React.memo(function () { const f = useFriendsHome(); const bf = useBestFriends(); useCurrentAccount(); useFriendsPresence([...(f ? f : []), ...(bf ? bf : [])].map(a=>a.id)) const robux = useRobuxBalance(); const [isOutfitSelectorVisible, setIsOutfitSelectorVisible] = useState(false); return ( <> {isOutfitSelectorVisible ? ( ) : ( <> )}
{robux ? (

{robux.toLocaleString()}

) : ( <> )}
); }); export const QuickTopUILogoPart = React.memo(function () { return (

{"ocbwoy3-chan's roblox"}

); });