Styling fixes

This commit is contained in:
austinkelsay 2024-09-28 19:06:17 -05:00
parent 6efbdb1ed7
commit f48559bb29
3 changed files with 19 additions and 9 deletions

View File

@ -28,6 +28,11 @@ const UserProfile = () => {
const { showToast } = useToast();
const menu = useRef(null);
const copyToClipboard = (text) => {
navigator.clipboard.writeText(text);
showToast("success", "Copied", "Copied to clipboard");
};
useEffect(() => {
if (session?.user) {
setUser(session.user);
@ -73,13 +78,13 @@ const UserProfile = () => {
{nip19.npubEncode(user.pubkey)} <i className="pi pi-question-circle text-xl pubkey-tooltip" />
</h2>
{user?.lightningAddress && (
<h3 className="text-center text-xl my-2">
<span className="font-bold">Lightning Address:</span> {user.lightningAddress.name}@plebdevs.com
<h3 className="w-fit mx-auto text-center text-xl my-2 bg-gray-800 rounded-lg p-4">
<span className="font-bold">Lightning Address:</span> {user.lightningAddress.name}@plebdevs.com <i className="pi pi-copy cursor-pointer hover:text-gray-400" onClick={() => copyToClipboard(user.lightningAddress.name + "@plebdevs.com")} />
</h3>
)}
{user?.nip05 && (
<h3 className="text-center text-xl my-2">
<span className="font-bold">NIP-05:</span> {user.nip05.name}@plebdevs.com
<h3 className="w-fit mx-auto text-center text-xl my-2 bg-gray-800 rounded-lg p-4">
<span className="font-bold">NIP-05:</span> {user.nip05.name}@plebdevs.com <i className="pi pi-copy cursor-pointer hover:text-gray-400" onClick={() => copyToClipboard(user.nip05.name + "@plebdevs.com")} />
</h3>
)}
{/* <GithubContributionChart username={"austinkelsay"} /> */}

View File

@ -43,6 +43,11 @@ const UserSettings = () => {
}
}, [ndk]);
const copyToClipboard = (text) => {
navigator.clipboard.writeText(text);
showToast("success", "Copied", "Copied to clipboard");
};
const updateRelayStatuses = useCallback(() => {
// export enum NDKRelayStatus {
@ -182,13 +187,13 @@ const UserSettings = () => {
{nip19.npubEncode(user.pubkey)} <i className="pi pi-question-circle text-xl pubkey-tooltip" />
</h2>
{user?.lightningAddress && (
<h3 className="text-center text-xl my-2">
<span className="font-bold">Lightning Address:</span> {user.lightningAddress.name}@plebdevs.com
<h3 className="w-fit mx-auto text-center text-xl my-2 bg-gray-800 rounded-lg p-4">
<span className="font-bold">Lightning Address:</span> {user.lightningAddress.name}@plebdevs.com <i className="pi pi-copy cursor-pointer hover:text-gray-400" onClick={() => copyToClipboard(user.lightningAddress.name + "@plebdevs.com")} />
</h3>
)}
{user?.nip05 && (
<h3 className="text-center text-xl my-2">
<span className="font-bold">NIP-05:</span> {user.nip05.name}@plebdevs.com
<h3 className="w-fit mx-auto text-center text-xl my-2 bg-gray-800 rounded-lg p-4">
<span className="font-bold">NIP-05:</span> {user.nip05.name}@plebdevs.com <i className="pi pi-copy cursor-pointer hover:text-gray-400" onClick={() => copyToClipboard(user.nip05.name + "@plebdevs.com")} />
</h3>
)}
<div className="flex flex-col w-1/2 mx-auto justify-between items-center max-mob:w-full max-tab:w-full">

View File

@ -33,7 +33,7 @@ const AboutPage = () => {
<h1 className="text-3xl font-bold mb-6">About PlebDevs</h1>
)}
<Card className="mb-4">
<Card title="About PlebDevs" className="mb-4">
<div className='flex flex-row gap-4 max-mob:flex-col max-tab:flex-col'>
<Message pt={{
icon: {