mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
made sample profile page
This commit is contained in:
parent
b43fb35b47
commit
a808045a7d
17 changed files with 118 additions and 179 deletions
|
@ -10,11 +10,20 @@ interface Props extends DivProps {
|
|||
url?: string;
|
||||
username?: string;
|
||||
size?: number;
|
||||
preset?: typeof PRESETS[keyof typeof PRESETS];
|
||||
innerRef?: React.Ref<any>;
|
||||
}
|
||||
|
||||
const Avatar: FC<Props> = ({ url, username, size, className, innerRef, ...rest }) => {
|
||||
const backgroundImage = !!url ? `url('${getURLFromString(url, PRESETS.avatar)}')` : undefined;
|
||||
const Avatar: FC<Props> = ({
|
||||
url,
|
||||
username,
|
||||
size,
|
||||
className,
|
||||
innerRef,
|
||||
preset = PRESETS.avatar,
|
||||
...rest
|
||||
}) => {
|
||||
const backgroundImage = !!url ? `url('${getURLFromString(url, preset)}')` : undefined;
|
||||
const onOpenProfile = useCallback(() => openUserProfile(username), [username]);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue