mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +00:00
Good stuff
This commit is contained in:
parent
a0a9b9fcc8
commit
b800ab3b88
@ -11,7 +11,7 @@ import { useRouter } from "next/router";
|
||||
import { formatTimestampToHowLongAgo } from "@/utils/time";
|
||||
import { ProgressSpinner } from "primereact/progressspinner";
|
||||
import GenericButton from "@/components/buttons/GenericButton";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function CourseTemplate({ course }) {
|
||||
const { zaps, zapsLoading, zapsError } = useZapsSubscription({ event: course });
|
||||
@ -41,7 +41,7 @@ export function CourseTemplate({ course }) {
|
||||
pubkey: course.pubkey,
|
||||
kind: course.kind,
|
||||
identifier: course.id,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
setNAddress(nAddress);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import { formatTimestampToHowLongAgo } from "@/utils/time";
|
||||
import { nip19 } from "nostr-tools";
|
||||
import { Tag } from "primereact/tag";
|
||||
import GenericButton from "@/components/buttons/GenericButton";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function DocumentTemplate({ document }) {
|
||||
const { zaps, zapsLoading, zapsError } = useZapsSubscription({ event: document });
|
||||
@ -25,7 +25,7 @@ export function DocumentTemplate({ document }) {
|
||||
pubkey: document.pubkey,
|
||||
kind: document.kind,
|
||||
identifier: document.id,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
setNAddress(nAddress);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import { nip19 } from "nostr-tools";
|
||||
import { formatTimestampToHowLongAgo } from "@/utils/time";
|
||||
import { Tag } from "primereact/tag";
|
||||
import GenericButton from "@/components/buttons/GenericButton";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function VideoTemplate({ video }) {
|
||||
const { zaps, zapsLoading, zapsError } = useZapsSubscription({ event: video });
|
||||
@ -26,7 +26,7 @@ export function VideoTemplate({ video }) {
|
||||
pubkey: video.pubkey,
|
||||
kind: video.kind,
|
||||
identifier: video.id,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
})
|
||||
setNAddress(addr);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import { findKind0Fields } from '@/utils/nostr';
|
||||
import 'primeicons/primeicons.css';
|
||||
import CoursePaymentButton from "@/components/bitcoinConnect/CoursePaymentButton";
|
||||
import { ProgressSpinner } from 'primereact/progressspinner';
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
import useWindowWidth from '@/hooks/useWindowWidth';
|
||||
|
||||
const MDDisplay = dynamic(
|
||||
@ -69,7 +69,7 @@ export default function CourseDetails({ processedEvent, paidCourse, lessons, dec
|
||||
pubkey: processedEvent.pubkey,
|
||||
kind: processedEvent.kind,
|
||||
identifier: processedEvent.d,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
setNAddress(naddr);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import { useSession } from 'next-auth/react';
|
||||
import useWindowWidth from "@/hooks/useWindowWidth";
|
||||
import { useNDKContext } from "@/context/NDKContext";
|
||||
import { findKind0Fields } from '@/utils/nostr';
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
import { ProgressSpinner } from 'primereact/progressspinner';
|
||||
|
||||
const lnAddress = process.env.NEXT_PUBLIC_LIGHTNING_ADDRESS;
|
||||
@ -49,7 +49,7 @@ export default function CourseDetailsNew({ processedEvent, paidCourse, lessons,
|
||||
pubkey: processedEvent.pubkey,
|
||||
kind: processedEvent.kind,
|
||||
identifier: processedEvent.d,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
setNAddress(naddr);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import { Divider } from "primereact/divider";
|
||||
import { getTotalFromZaps } from "@/utils/lightning";
|
||||
import dynamic from "next/dynamic";
|
||||
import useWindowWidth from "@/hooks/useWindowWidth";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const MDDisplay = dynamic(
|
||||
() => import("@uiw/react-markdown-preview"),
|
||||
@ -39,7 +39,7 @@ const DocumentLesson = ({ lesson, course, decryptionPerformed, isPaid }) => {
|
||||
pubkey: lesson.pubkey,
|
||||
kind: lesson.kind,
|
||||
identifier: lesson.d,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
})
|
||||
setNAddress(addr);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import { findKind0Fields } from '@/utils/nostr';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { formatDateTime } from '@/utils/time';
|
||||
import { validateEvent } from '@/utils/nostr';
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
import 'primeicons/primeicons.css';
|
||||
|
||||
const MDDisplay = dynamic(
|
||||
@ -110,7 +110,7 @@ export default function DraftCourseDetails({ processedEvent, draftId, lessons })
|
||||
pubkey: resource.pubkey,
|
||||
kind: resource.kind,
|
||||
identifier: dTag,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
|
||||
const userResponse = await axios.get(`/api/users/${user.pubkey}`);
|
||||
|
@ -9,7 +9,7 @@ import { nip19 } from "nostr-tools";
|
||||
import { getTotalFromZaps } from "@/utils/lightning";
|
||||
import dynamic from "next/dynamic";
|
||||
import { Divider } from "primereact/divider";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
import useWindowWidth from "@/hooks/useWindowWidth";
|
||||
|
||||
const MDDisplay = dynamic(
|
||||
@ -38,7 +38,7 @@ const VideoLesson = ({ lesson, course, decryptionPerformed, isPaid }) => {
|
||||
pubkey: lesson.pubkey,
|
||||
kind: lesson.kind,
|
||||
identifier: lesson.d,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
setNAddress(addr);
|
||||
}, [lesson]);
|
||||
|
@ -5,7 +5,7 @@ import { useImageProxy } from "@/hooks/useImageProxy";
|
||||
import { useRouter } from "next/router";
|
||||
import { nip19 } from "nostr-tools";
|
||||
import { Divider } from 'primereact/divider';
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
|
||||
const ContentListItem = (content) => {
|
||||
@ -24,7 +24,7 @@ const ContentListItem = (content) => {
|
||||
identifier: content.id,
|
||||
kind: content.kind,
|
||||
pubkey: content.pubkey,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
router.push(`/course/${nAddress}`);
|
||||
} else if (isDraftCourse) {
|
||||
@ -34,7 +34,7 @@ const ContentListItem = (content) => {
|
||||
identifier: content.id,
|
||||
kind: content.kind,
|
||||
pubkey: content.pubkey,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
router.push(`/details/${nAddress}`);
|
||||
} else if (isDraft) {
|
||||
|
@ -16,8 +16,7 @@ import ContentList from "@/components/content/lists/ContentList";
|
||||
import { parseEvent } from "@/utils/nostr";
|
||||
import { ProgressSpinner } from "primereact/progressspinner";
|
||||
import { useNDKContext } from "@/context/NDKContext";
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const UserContent = () => {
|
||||
const [activeIndex, setActiveIndex] = useState(0);
|
||||
@ -60,7 +59,7 @@ const UserContent = () => {
|
||||
const fetchAllContentFromNDK = async (ids) => {
|
||||
try {
|
||||
await ndk.connect();
|
||||
const filter = { "#d": ids, authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { "#d": ids, authors: appConfig.authorPubkeys };
|
||||
|
||||
const uniqueEvents = new Set();
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { Column } from "primereact/column";
|
||||
import { useImageProxy } from "@/hooks/useImageProxy";
|
||||
import { useSession } from 'next-auth/react';
|
||||
import { ProgressSpinner } from "primereact/progressspinner";
|
||||
import { useNDKContext, defaultRelayUrls } from "@/context/NDKContext";
|
||||
import { useNDKContext } from "@/context/NDKContext";
|
||||
import useWindowWidth from "@/hooks/useWindowWidth";
|
||||
import Image from "next/image";
|
||||
import BitcoinConnectButton from "@/components/bitcoinConnect/BitcoinConnect";
|
||||
@ -14,6 +14,7 @@ import { nip19 } from "nostr-tools";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import { Tooltip } from "primereact/tooltip";
|
||||
import { useToast } from "@/hooks/useToast";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const UserSettings = () => {
|
||||
const [user, setUser] = useState(null);
|
||||
@ -96,7 +97,7 @@ const UserSettings = () => {
|
||||
};
|
||||
|
||||
const removeRelay = (url) => {
|
||||
if (!defaultRelayUrls.includes(url)) {
|
||||
if (!appConfig.defaultRelayUrls.includes(url)) {
|
||||
setUserRelays(userRelays.filter(relay => relay !== url));
|
||||
reInitializeNDK();
|
||||
setCollapsed(true);
|
||||
@ -107,7 +108,7 @@ const UserSettings = () => {
|
||||
const relayActionsBody = (rowData) => {
|
||||
return (
|
||||
<div>
|
||||
{!defaultRelayUrls.includes(rowData) ? (
|
||||
{!appConfig.defaultRelayUrls.includes(rowData) ? (
|
||||
<GenericButton
|
||||
icon="pi pi-trash"
|
||||
className="p-button-rounded p-button-danger p-button-text"
|
||||
|
@ -1,13 +1,13 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { nip19 } from "nostr-tools";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const ZapForm = ({ event }) => {
|
||||
const nAddress = nip19.naddrEncode({
|
||||
kind: event?.kind,
|
||||
pubkey: event?.pubkey,
|
||||
identifier: event.d,
|
||||
relays: [...defaultRelayUrls]
|
||||
relays: [...appConfig.defaultRelayUrls]
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -2,28 +2,16 @@ import React, { createContext, useContext, useEffect, useState, useMemo } from '
|
||||
import NDK, { NDKNip07Signer } from "@nostr-dev-kit/ndk";
|
||||
import NDKCacheAdapterDexie from "@nostr-dev-kit/ndk-cache-dexie";
|
||||
import { useLocalStorage } from "@/hooks/useLocalStorage";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const NDKContext = createContext(null);
|
||||
|
||||
export const defaultRelayUrls = [
|
||||
"wss://nos.lol/",
|
||||
"wss://relay.damus.io/",
|
||||
"wss://relay.snort.social/",
|
||||
"wss://relay.nostr.band/",
|
||||
"wss://relay.mutinywallet.com/",
|
||||
"wss://relay.primal.net/",
|
||||
"wss://nostr21.com/",
|
||||
"wss://nostrue.com/",
|
||||
"wss://purplerelay.com/",
|
||||
// "wss://relay.devs.tools/"
|
||||
];
|
||||
|
||||
export const NDKProvider = ({ children }) => {
|
||||
const [ndk, setNdk] = useState(null);
|
||||
const [userRelays, setUserRelays] = useLocalStorage("userRelays", defaultRelayUrls);
|
||||
const [userRelays, setUserRelays] = useLocalStorage("userRelays", appConfig.defaultRelayUrls);
|
||||
|
||||
const createNDKInstance = (relays) => {
|
||||
const allRelays = [...new Set([...defaultRelayUrls, ...relays])];
|
||||
const allRelays = [...new Set([...appConfig.defaultRelayUrls, ...relays])];
|
||||
return new NDK({
|
||||
explicitRelayUrls: allRelays,
|
||||
enableOutboxModel: true,
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import { useContentIdsQuery } from '@/hooks/apiQueries/useContentIdsQuery';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function useCourses() {
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
@ -35,7 +34,7 @@ export function useCourses() {
|
||||
|
||||
await ndk.connect();
|
||||
|
||||
const filter = { kinds: [30004], authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { kinds: [30004], authors: appConfig.authorPubkeys };
|
||||
const events = await ndk.fetchEvents(filter);
|
||||
|
||||
if (events && events.size > 0) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import { useContentIdsQuery } from '@/hooks/apiQueries/useContentIdsQuery';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function useDocuments() {
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
@ -36,7 +35,7 @@ export function useDocuments() {
|
||||
|
||||
await ndk.connect();
|
||||
|
||||
const filter = { kinds: [30023, 30402], authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { kinds: [30023, 30402], authors: appConfig.authorPubkeys };
|
||||
const events = await ndk.fetchEvents(filter);
|
||||
|
||||
if (events && events.size > 0) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import { useContentIdsQuery } from '@/hooks/apiQueries/useContentIdsQuery';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function useVideos() {
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
@ -36,7 +35,7 @@ export function useVideos() {
|
||||
|
||||
await ndk.connect();
|
||||
|
||||
const filter = { kinds: [30023, 30402], authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { kinds: [30023, 30402], authors: appConfig.authorPubkeys };
|
||||
const events = await ndk.fetchEvents(filter);
|
||||
|
||||
if (events && events.size > 0) {
|
||||
|
@ -2,8 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import axios from 'axios';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export function useCoursesQuery() {
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
@ -30,7 +29,7 @@ export function useCoursesQuery() {
|
||||
|
||||
await ndk.connect();
|
||||
|
||||
const filter = { kinds: [30004], authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { kinds: [30004], authors: appConfig.authorPubkeys };
|
||||
const events = await ndk.fetchEvents(filter);
|
||||
|
||||
console.log('events', events);
|
||||
|
@ -2,8 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import axios from 'axios';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from '@/config/appConfig';
|
||||
|
||||
export function useDocumentsQuery() {
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
@ -31,7 +30,7 @@ export function useDocumentsQuery() {
|
||||
|
||||
await ndk.connect();
|
||||
|
||||
const filter = { kinds: [30023, 30402], authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { kinds: [30023, 30402], authors: appConfig.authorPubkeys };
|
||||
const events = await ndk.fetchEvents(filter);
|
||||
|
||||
if (events && events.size > 0) {
|
||||
|
@ -2,8 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import axios from 'axios';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from '@/config/appConfig';
|
||||
|
||||
export function useVideosQuery() {
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
@ -31,7 +30,7 @@ export function useVideosQuery() {
|
||||
|
||||
await ndk.connect();
|
||||
|
||||
const filter = { kinds: [30023, 30402], authors: [AUTHOR_PUBKEY] };
|
||||
const filter = { kinds: [30023, 30402], authors: appConfig.authorPubkeys };
|
||||
const events = await ndk.fetchEvents(filter);
|
||||
|
||||
if (events && events.size > 0) {
|
||||
|
@ -2,8 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
import { useContentIdsQuery } from '@/hooks/apiQueries/useContentIdsQuery';
|
||||
import { useNDKContext } from '@/context/NDKContext';
|
||||
import { parseEvent, parseCourseEvent } from '@/utils/nostr';
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.NEXT_PUBLIC_AUTHOR_PUBKEY;
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
export const useContentSearch = () => {
|
||||
const [allContent, setAllContent] = useState([]);
|
||||
@ -15,7 +14,7 @@ export const useContentSearch = () => {
|
||||
try {
|
||||
await ndk.connect();
|
||||
const filter = {
|
||||
authors: [AUTHOR_PUBKEY],
|
||||
authors: appConfig.authorPubkeys,
|
||||
kinds: [30004, 30023, 30402],
|
||||
"#d": ids
|
||||
}
|
||||
|
@ -10,13 +10,12 @@ import { generateSecretKey, getPublicKey } from 'nostr-tools/pure'
|
||||
import { bytesToHex } from '@noble/hashes/utils'
|
||||
import { updateUser } from "@/db/models/userModels";
|
||||
import { createRole } from "@/db/models/roleModels";
|
||||
import { defaultRelayUrls } from "@/context/NDKContext";
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const BASE_URL = process.env.BASE_URL;
|
||||
const AUTHOR_PUBKEY = process.env.AUTHOR_PUBKEY;
|
||||
|
||||
const ndk = new NDK({
|
||||
explicitRelayUrls: defaultRelayUrls,
|
||||
explicitRelayUrls: appConfig.defaultRelayUrls,
|
||||
});
|
||||
|
||||
const authorize = async (pubkey) => {
|
||||
@ -107,7 +106,7 @@ export const authOptions = {
|
||||
}
|
||||
}
|
||||
|
||||
if (user && user?.pubkey === AUTHOR_PUBKEY && !user?.role) {
|
||||
if (user && appConfig.authorPubkeys.includes(user?.pubkey) && !user?.role) {
|
||||
// create a new author role for this user
|
||||
const role = await createRole({
|
||||
userId: user.id,
|
||||
|
@ -2,6 +2,7 @@ import { getServerSession } from "next-auth/next"
|
||||
import { authOptions } from "./auth/[...nextauth]"
|
||||
import { getSignedUrl } from "@aws-sdk/s3-request-presigner"
|
||||
import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3"
|
||||
import appConfig from "@/config/appConfig";
|
||||
|
||||
const s3Client = new S3Client({
|
||||
endpoint: "https://nyc3.digitaloceanspaces.com", // DigitalOcean Spaces endpoint
|
||||
@ -12,8 +13,6 @@ const s3Client = new S3Client({
|
||||
},
|
||||
})
|
||||
|
||||
const AUTHOR_PUBKEY = process.env.AUTHOR_PUBKEY
|
||||
|
||||
export default async function handler(req, res) {
|
||||
try {
|
||||
// Check if the request method is GET
|
||||
@ -34,7 +33,7 @@ export default async function handler(req, res) {
|
||||
}
|
||||
|
||||
// Check if the user is authorized to access the video
|
||||
if (!session.user.role?.subscribed && session.user.pubkey !== AUTHOR_PUBKEY) {
|
||||
if (!session.user.role?.subscribed && !appConfig.authorPubkeys.includes(session.user.pubkey)) {
|
||||
const purchasedVideo = session.user.purchased?.find(purchase => purchase?.resource?.videoId === videoKey)
|
||||
console.log("purchasedVideo", purchasedVideo)
|
||||
if (!purchasedVideo) {
|
||||
|
@ -9,7 +9,7 @@ import { useNDKContext } from '@/context/NDKContext';
|
||||
import VideoDetails from '@/components/content/videos/VideoDetails';
|
||||
import DocumentDetails from '@/components/content/documents/DocumentDetails';
|
||||
import { ProgressSpinner } from 'primereact/progressspinner';
|
||||
import { defaultRelayUrls } from '@/context/NDKContext';
|
||||
import appConfig from "@/config/appConfig";
|
||||
import 'primeicons/primeicons.css';
|
||||
|
||||
const privkey = process.env.NEXT_PUBLIC_APP_PRIV_KEY;
|
||||
@ -171,7 +171,7 @@ export default function Details() {
|
||||
pubkey: processedEvent.pubkey,
|
||||
kind: processedEvent.kind,
|
||||
identifier: processedEvent.d,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
setNAddress(naddr);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import useResponsiveImageDimensions from '@/hooks/useResponsiveImageDimensions';
|
||||
import 'primeicons/primeicons.css';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { validateEvent } from '@/utils/nostr';
|
||||
import { defaultRelayUrls } from '@/context/NDKContext';
|
||||
import appConfig from "@/config/appConfig";
|
||||
import { useIsAdmin } from "@/hooks/useIsAdmin";
|
||||
|
||||
const MDDisplay = dynamic(
|
||||
@ -132,7 +132,7 @@ export default function Draft() {
|
||||
pubkey: resource.pubkey,
|
||||
kind: resource.kind,
|
||||
identifier: dTag,
|
||||
relayUrls: defaultRelayUrls
|
||||
relayUrls: appConfig.defaultRelayUrls
|
||||
});
|
||||
|
||||
const userResponse = await axios.get(`/api/users/${user.pubkey}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user