forked from Kieran/snort
feat: link to user profile from name
This commit is contained in:
parent
ae133130ef
commit
8b37980da3
@ -10,3 +10,11 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pfp a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pfp a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import "./ProfileImage.css";
|
import { useMemo } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import useProfile from "../feed/ProfileFeed";
|
import useProfile from "../feed/ProfileFeed";
|
||||||
import Nostrich from "../nostrich.jpg";
|
import Nostrich from "../nostrich.jpg";
|
||||||
import { useMemo } from "react";
|
|
||||||
|
import "./ProfileImage.css";
|
||||||
|
|
||||||
export default function ProfileImage(props) {
|
export default function ProfileImage(props) {
|
||||||
const pubkey = props.pubkey;
|
const pubkey = props.pubkey;
|
||||||
@ -24,7 +27,7 @@ export default function ProfileImage(props) {
|
|||||||
<div className="pfp">
|
<div className="pfp">
|
||||||
<img src={hasImage ? user.picture : Nostrich} onClick={() => navigate(`/p/${pubkey}`)} />
|
<img src={hasImage ? user.picture : Nostrich} onClick={() => navigate(`/p/${pubkey}`)} />
|
||||||
<div>
|
<div>
|
||||||
{name}
|
<Link key={pubkey} to={`/p/${pubkey}`}>{name}</Link>
|
||||||
{subHeader ? <div>{subHeader}</div> : null}
|
{subHeader ? <div>{subHeader}</div> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user