diff --git a/src/components/profile/UserProfileCard.js b/src/components/profile/UserProfileCard.js
index af37210..4ace6bd 100644
--- a/src/components/profile/UserProfileCard.js
+++ b/src/components/profile/UserProfileCard.js
@@ -2,19 +2,24 @@ import React, { useRef, useState } from 'react';
import Image from 'next/image';
import { Menu } from 'primereact/menu';
import { Tooltip } from 'primereact/tooltip';
+import { Dialog } from 'primereact/dialog';
import { nip19 } from 'nostr-tools';
import { useImageProxy } from '@/hooks/useImageProxy';
import { useToast } from '@/hooks/useToast';
import UserBadges from '@/components/profile/UserBadges';
import useWindowWidth from '@/hooks/useWindowWidth';
import MoreInfo from '@/components/MoreInfo';
+import UserRelaysTable from '@/components/profile/DataTables/UserRelaysTable';
+import { useNDKContext } from "@/context/NDKContext";
const UserProfileCard = ({ user }) => {
const [showBadges, setShowBadges] = useState(false);
+ const [showRelaysModal, setShowRelaysModal] = useState(false);
const menu = useRef(null);
const { showToast } = useToast();
const { returnImageProxy } = useImageProxy();
const windowWidth = useWindowWidth();
+ const { ndk, userRelays, setUserRelays, reInitializeNDK } = useNDKContext();
const copyToClipboard = (text) => {
navigator.clipboard.writeText(text);
@@ -43,6 +48,11 @@ const UserProfileCard = ({ user }) => {
label: 'Open Nostr Profile',
icon: 'pi pi-external-link',
command: () => window.open(`https://nostr.com/${nip19.npubEncode(user?.pubkey)}`, '_blank')
+ },
+ {
+ label: 'Manage Relays',
+ icon: 'pi pi-server',
+ command: () => setShowRelaysModal(true)
}
];
@@ -282,6 +292,20 @@ const UserProfileCard = ({ user }) => {
visible={showBadges}
onHide={() => setShowBadges(false)}
/>
+
>
);
};
diff --git a/src/components/profile/UserSettings.js b/src/components/profile/UserSettings.js
deleted file mode 100644
index afb3f05..0000000
--- a/src/components/profile/UserSettings.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import React, { useState, useEffect } from "react";
-import UserProfileCard from "@/components/profile/UserProfileCard";
-import { useSession } from 'next-auth/react';
-import { useNDKContext } from "@/context/NDKContext";
-import useWindowWidth from "@/hooks/useWindowWidth";
-import UserRelaysTable from "@/components/profile/DataTables/UserRelaysTable";
-import UserAccountLinking from "@/components/profile/UserAccountLinking";
-const UserSettings = () => {
- const [user, setUser] = useState(null);
- const { ndk, userRelays, setUserRelays, reInitializeNDK } = useNDKContext();
- const { data: session } = useSession();
- const windowWidth = useWindowWidth();
-
- useEffect(() => {
- if (session?.user) {
- setUser(session.user);
- }
- }, [session]);
-
- return (
- user && (
-
- {windowWidth < 768 && (
-
Settings
- )}
-
-
-
-
- {user && }
-
-
-
-
-
-
-
- )
- );
-};
-
-export default UserSettings;
diff --git a/src/components/profile/subscription/UserSubscription.js b/src/components/profile/subscription/UserSubscription.js
index 4d41c02..59358f8 100644
--- a/src/components/profile/subscription/UserSubscription.js
+++ b/src/components/profile/subscription/UserSubscription.js
@@ -117,7 +117,7 @@ const UserSubscription = () => {
{!subscribed && (
{
>
)}
-
+
How does the subscription work?
diff --git a/src/config/appConfig.js b/src/config/appConfig.js
index 784cb30..98cefb8 100644
--- a/src/config/appConfig.js
+++ b/src/config/appConfig.js
@@ -9,7 +9,7 @@ const appConfig = {
"wss://purplerelay.com/",
"wss://relay.devs.tools/"
],
- authorPubkeys: ["f33c8a9617cb15f705fc70cd461cfd6eaf22f9e24c33eabad981648e5ec6f741", "c67cd3e1a83daa56cff16f635db2fdb9ed9619300298d4701a58e68e84098345"],
+ authorPubkeys: ["f33c8a9617cb15f705fc70cd461cfd6eaf22f9e24c33eabad981648e5ec6f741", "c67cd3e1a83daa56cff16f635db2fdb9ed9619300298d4701a58e68e84098345", "6260f29fa75c91aaa292f082e5e87b438d2ab4fdf96af398567b01802ee2fcd4"],
customLightningAddresses: [
{
// todo remove need for lowercase
diff --git a/src/pages/about.js b/src/pages/about.js
index 5e7bd51..bf47495 100644
--- a/src/pages/about.js
+++ b/src/pages/about.js
@@ -211,6 +211,7 @@ const AboutPage = () => {
Subscribe to PlebDevs
filteredContent, [filteredContent]);
-
useEffect(() => {
if (documents && !documentsLoading) {
const processedDocuments = documents.map(document => ({...parseEvent(document), type: 'document'}));
diff --git a/src/pages/profile.js b/src/pages/profile.js
index 6edafa2..935f457 100644
--- a/src/pages/profile.js
+++ b/src/pages/profile.js
@@ -1,7 +1,6 @@
import React, { useState, useEffect } from "react";
import { TabView, TabPanel } from "primereact/tabview";
import UserProfile from "@/components/profile/UserProfile";
-import UserSettings from "@/components/profile/UserSettings";
import UserContent from "@/components/profile/UserContent";
import UserSubscription from "@/components/profile/subscription/UserSubscription";
import { useRouter } from "next/router";
@@ -16,7 +15,7 @@ const Profile = () => {
const [activeTab, setActiveTab] = useState(0);
const {isAdmin, isLoading} = useIsAdmin();
- const tabs = ["profile", "settings", "content", "subscribe"];
+ const tabs = ["profile", "content", "subscribe"];
useEffect(() => {
const { tab } = router.query;
@@ -74,13 +73,6 @@ const Profile = () => {
}}>
-
-
-
{isAdmin && (