Merge pull request #78 from ragestudio/user-preview-default-click

added default action on click user preview component
This commit is contained in:
srgooglo 2022-11-04 16:56:21 +01:00 committed by GitHub
commit e697bf43f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,8 +34,8 @@ export default (props) => {
const handleOnClick = async () => {
if (typeof props.onClick !== "function") {
console.warn("UserPreview: onClick is not a function")
return
console.warn("UserPreview: onClick is not a function, executing default action")
return app.goToAccount(userData.username)
}
return await props.onClick(userData)