import { Redirect, useParams } from "react-router-dom"; import { useAuth } from "../useAuth"; import { ProfilePicture, useAuthenticatedRequest } from "../util"; import Nav from "../sections/Nav"; import ErrorPage from "./ErrorPage"; import ReactPlaceholder from "react-placeholder/lib"; import { Envelope, HouseDoor } from "react-bootstrap-icons"; interface Response { uuid: string; username: string; name?: string; nick?: string; email?: string; external_profile_url?: string; picture_url?: string; } interface UrlParams { uuid: string; } export default function User() { const auth = useAuth(); const { uuid } = useParams(); if (!auth) { return ; } const { response: user, error } = useAuthenticatedRequest({ auth, endpoint: "users/info/" + uuid, }); if (error) { return ; } const ready = !!user; return (
); }