feat: add avatar/bio/links/names/pronouns to user page
This commit is contained in:
parent
412d720abc
commit
862a64840e
16 changed files with 650 additions and 90 deletions
27
Foxnouns.Frontend/app/components/ProfileLink.tsx
Normal file
27
Foxnouns.Frontend/app/components/ProfileLink.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { Globe } from "react-bootstrap-icons";
|
||||
|
||||
export default function ProfileLink({ link }: { link: string }) {
|
||||
const isLink = link.startsWith("http://") || link.startsWith("https://");
|
||||
|
||||
let displayLink = link;
|
||||
if (link.startsWith("http://")) displayLink = link.substring("http://".length);
|
||||
else if (link.startsWith("https://")) displayLink = link.substring("https://".length);
|
||||
if (displayLink.endsWith("/")) displayLink = displayLink.substring(0, displayLink.length - 1);
|
||||
|
||||
if (isLink) {
|
||||
return (
|
||||
<a href={link} className="text-decoration-none" rel="me nofollow noreferrer" target="_blank">
|
||||
<li className="py-2 py-lg-0">
|
||||
<Globe className="text-body" aria-hidden={true} />{" "}
|
||||
<span className="text-decoration-underline">{displayLink}</span>
|
||||
</li>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<li className="py-2 py-lg-0">
|
||||
<Globe aria-hidden={true} /> {displayLink}
|
||||
</li>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue