- {renderPaymentMessage()}
{authorView ? (
-
router.push(`/details/${processedEvent.id}/edit`)} label="Edit" severity='warning' outlined />
-
- {
- window.open(`https://habla.news/a/${nAddress}`, '_blank');
- }}
- />
+ {renderPaymentMessage()}
+
+ router.push(`/details/${processedEvent.id}/edit`)} label="Edit" severity='warning' outlined />
+
+ {
+ window.open(`https://habla.news/a/${nAddress}`, '_blank');
+ }}
+ />
+
) : (
-
- {course &&
window.open(`/course/${course}`, '_blank')} label={isMobileView ? "Course" : "Open Course"} tooltip="This is a lesson in a course" tooltipOptions={{ position: 'top' }} />}
- {
- window.open(`https://habla.news/a/${nAddress}`, '_blank');
- }}
- />
+
+ {renderPaymentMessage()}
+
+ {course && window.open(`/course/${course}`, '_blank')} label={isMobileView ? "Course" : "Open Course"} tooltip="This is a lesson in a course" tooltipOptions={{ position: 'top' }} />}
+ {
+ window.open(`https://habla.news/a/${nAddress}`, '_blank');
+ }}
+ />
+
)}
diff --git a/src/components/content/videos/VideoDetails.js b/src/components/content/videos/VideoDetails.js
index 11ae6bc..c5eca42 100644
--- a/src/components/content/videos/VideoDetails.js
+++ b/src/components/content/videos/VideoDetails.js
@@ -137,13 +137,13 @@ const VideoDetails = ({ processedEvent, topics, title, summary, image, price, au
Additional Links:
{processedEvent.additionalLinks.map((link, index) => (
- {renderPaymentMessage()}
{authorView ? (
-
+
+ {renderPaymentMessage()}
+
router.push(`/details/${processedEvent.id}/edit`)} label="Edit" severity='warning' outlined />
- ) : (
-
+
+ ) : (
+
+ {renderPaymentMessage()}
+
{course && window.open(`/course/${course}`, '_blank')} label={isMobileView ? "Course" : "Open Course"} tooltip="This is a lesson in a course" tooltipOptions={{ position: 'top' }} />}
- )}
+
+ )}
diff --git a/src/components/sidebar/Sidebar.js b/src/components/sidebar/Sidebar.js
index cdc75cb..e2af6b1 100644
--- a/src/components/sidebar/Sidebar.js
+++ b/src/components/sidebar/Sidebar.js
@@ -1,5 +1,4 @@
import React, { useState, useEffect, useCallback } from 'react';
-import { Accordion, AccordionTab } from 'primereact/accordion';
import { useRouter } from 'next/router';
import { useSession, signOut } from 'next-auth/react';
import { useIsAdmin } from '@/hooks/useIsAdmin';
@@ -20,6 +19,12 @@ const Sidebar = ({ course = false }) => {
// Helper function to determine if the path matches the current route
const isActive = (path) => {
+ if (path === '/content') {
+ return router.pathname === '/content';
+ }
+ if (path === '/feed') {
+ return router.pathname === '/feed';
+ }
return router.asPath === path;
};
@@ -121,30 +126,9 @@ const Sidebar = ({ course = false }) => {
router.push('/')} className={`w-full flex flex-row items-center cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/') ? 'bg-gray-700' : ''}`}>
Home
-
- ({
- className: `hover:bg-gray-700 rounded-lg ${isActive('/content') || router.pathname === '/content' ? 'bg-gray-700' : ''} ${styles['p-accordion-header-link']}`
- }),
- content: styles['p-accordion-content'],
- header: 'text-lg'
- }}
- header={'Content'}>
- router.push('/content?tag=all')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/content?tag=all') ? 'bg-gray-700' : ''}`}>
-
All
-
- router.push('/content?tag=courses')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/content?tag=courses') ? 'bg-gray-700' : ''}`}>
-
Courses
-
- router.push('/content?tag=videos')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/content?tag=videos') ? 'bg-gray-700' : ''}`}>
-
Videos
-
- router.push('/content?tag=documents')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/content?tag=documents') ? 'bg-gray-700' : ''}`}>
-
Documents
-
-
-
+
router.push('/content')} className={`w-full flex flex-row items-center cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/content') || router.pathname === '/content' ? 'bg-gray-700' : ''}`}>
+
Content
+
{isAdmin && (
router.push('/create')} className={`w-full flex flex-row items-center cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/create') ? 'bg-gray-700' : ''}`}>
Create
@@ -153,40 +137,19 @@ const Sidebar = ({ course = false }) => {
session ? router.push('/profile?tab=subscribe') : router.push('/subscribe')} className={`w-full flex flex-row items-center cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/profile?tab=subscribe') || isActive('/subscribe') ? 'bg-gray-700' : ''}`}>
Subscribe
-
- ({
- className: `hover:bg-gray-700 rounded-lg ${isActive('/feed') ? 'bg-gray-700' : ''} ${styles['p-accordion-header-link']}`
- }),
- content: styles['p-accordion-content'],
- header: 'text-lg'
- }}
- header={"Feeds"}>
- router.push('/feed?channel=global')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/feed?channel=global') ? 'bg-gray-700' : ''}`}>
-
global
-
- router.push('/feed?channel=nostr')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/feed?channel=nostr') ? 'bg-gray-700' : ''}`}>
-
nostr
-
- router.push('/feed?channel=discord')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/feed?channel=discord') ? 'bg-gray-700' : ''}`}>
-
discord
-
- router.push('/feed?channel=stackernews')} className={`w-full cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/feed?channel=stackernews') ? 'bg-gray-700' : ''}`}>
-
stackernews
-
-
-
+
router.push('/feed?channel=global')} className={`w-full flex flex-row items-center cursor-pointer py-2 my-2 hover:bg-gray-700 rounded-lg ${isActive('/feed') ? 'bg-gray-700' : ''}`}>
+
Feeds
+
) : (
// Collapsed sidebar content (icons only)
!course && (
router.push('/')} />
- router.push('/content')} />
+ router.push('/content')} />
router.push('/create')} />
session ? router.push('/profile?tab=subscribe') : router.push('/auth/signin')} />
- router.push('/feed')} />
+ router.push('/feed?channel=global')} />
)
)}
diff --git a/src/config/appConfig.js b/src/config/appConfig.js
index b785a0f..0ecdf41 100644
--- a/src/config/appConfig.js
+++ b/src/config/appConfig.js
@@ -12,7 +12,7 @@ const appConfig = {
"wss://relay.devs.tools/"
],
// ganon "468f729dd409053dac5e7470622c3996aad88db6ed1de9165cb1921b5ab4fd5e",
- authorPubkeys: ["8cb60e215678879cda0bef4d5b3fc1a5c5925d2adb5d8c4fa7b7d03b5f2deaea", "676c02247668d5b18479be3d1a80933044256f3fbd03640a8c234684e641b6d6", "f33c8a9617cb15f705fc70cd461cfd6eaf22f9e24c33eabad981648e5ec6f741", "c67cd3e1a83daa56cff16f635db2fdb9ed9619300298d4701a58e68e84098345"],
+ authorPubkeys: ["8cb60e215678879cda0bef4d5b3fc1a5c5925d2adb5d8c4fa7b7d03b5f2deaea", "676c02247668d5b18479be3d1a80933044256f3fbd03640a8c234684e641b6d6", "f33c8a9617cb15f705fc70cd461cfd6eaf22f9e24c33eabad981648e5ec6f741", "c67cd3e1a83daa56cff16f635db2fdb9ed9619300298d4701a58e68e84098345", "468f729dd409053dac5e7470622c3996aad88db6ed1de9165cb1921b5ab4fd5e"],
customLightningAddresses: [
{
// todo remove need for lowercase
diff --git a/src/pages/feed.js b/src/pages/feed.js
index d810004..59f2ab7 100644
--- a/src/pages/feed.js
+++ b/src/pages/feed.js
@@ -84,14 +84,12 @@ const Feed = () => {
/>
)}
-