This commit is contained in:
Bojan Mojsilovic 2024-05-23 19:23:41 +02:00
parent 129aca7a54
commit e075c7741f
28 changed files with 593 additions and 25 deletions

View File

@ -14,6 +14,7 @@ import { SearchProvider } from './contexts/SearchContext';
import { MessagesProvider } from './contexts/MessagesContext';
import { MediaProvider } from './contexts/MediaContext';
import { AppProvider } from './contexts/AppContext';
import { ReadsProvider } from './contexts/ReadsContext';
export const APP_ID = `${Math.floor(Math.random()*10000000000)}`;
@ -39,13 +40,15 @@ const App: Component = () => {
<ProfileProvider>
<MessagesProvider>
<NotificationsProvider>
<HomeProvider>
<ExploreProvider>
<ThreadProvider>
<Router />
</ThreadProvider>
</ExploreProvider>
</HomeProvider>
<ReadsProvider>
<HomeProvider>
<ExploreProvider>
<ThreadProvider>
<Router />
</ThreadProvider>
</ExploreProvider>
</HomeProvider>
</ReadsProvider>
</NotificationsProvider>
</MessagesProvider>
</ProfileProvider>

View File

@ -16,6 +16,7 @@ import { useNotificationsContext } from './contexts/NotificationsContext';
import { useSearchContext } from './contexts/SearchContext';
const Home = lazy(() => import('./pages/Home'));
const Reads = lazy(() => import('./pages/Reads'));
const Layout = lazy(() => import('./components/Layout/Layout'));
const Explore = lazy(() => import('./pages/Explore'));
const Thread = lazy(() => import('./pages/Thread'));
@ -109,6 +110,7 @@ const Router: Component = () => {
<Route path="/" component={Layout} >
<Route path="/" component={Landing} />
<Route path="/home" component={Home} />
<Route path="/reads" component={Reads} />
<Route path="/thread/:id" component={Thread} />
<Route path="/e/:id" component={Thread} />
<Route path="/explore/:scope?/:timeframe?" component={Explore} />

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.12069C3.75 1.52587 4.99042 0.25 6.5 0.25H17.5C19.0096 0.25 20.25 1.52587 20.25 3.12069V22.958C20.25 23.6156 19.5534 23.9603 19.0713 23.6063L12.2921 18.6285C12.1177 18.5004 11.8823 18.5004 11.7079 18.6285L4.92872 23.6063C4.44657 23.9603 3.75 23.6156 3.75 22.958V3.12069ZM6.5 1.83046C5.80044 1.83046 5.25 2.4175 5.25 3.12069V21.4441L10.8504 17.3318C11.5403 16.8253 12.4597 16.8253 13.1496 17.3318L18.75 21.4441V3.12069C18.75 2.4175 18.1996 1.83046 17.5 1.83046H6.5Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 642 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 2.08046H6.5C5.94772 2.08046 5.5 2.54619 5.5 3.12069V20.9504L10.7025 17.1303C11.4804 16.5591 12.5197 16.5591 13.2975 17.1303L18.5 20.9504V3.12069C18.5 2.54619 18.0523 2.08046 17.5 2.08046ZM6.5 0C4.84315 0 3.5 1.39718 3.5 3.12069V22.958C3.5 23.8014 4.41427 24.2942 5.07668 23.8078L11.8558 18.83C11.9423 18.7665 12.0577 18.7665 12.1442 18.83L18.9233 23.8078C19.5857 24.2942 20.5 23.8014 20.5 22.958V3.12069C20.5 1.39718 19.1569 0 17.5 0H6.5Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 613 B

View File

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.25 1.03944C11.25 0.594241 11.5948 0.25 12 0.25C12.4052 0.25 12.75 0.594241 12.75 1.03944V14.9286L18.5155 9.79183C18.8279 9.51355 19.2963 9.54937 19.5664 9.87696C19.8412 10.2102 19.8025 10.7136 19.4845 10.9969L12.4989 17.2207C12.2146 17.474 11.7855 17.474 11.5011 17.2207L4.51553 10.9969C4.1975 10.7136 4.15886 10.2102 4.43364 9.87696C4.70378 9.54937 5.17217 9.51355 5.4845 9.79183L11.25 14.9286V1.03944Z" fill="#AAAAAA"/>
<path d="M0.25 19C0.25 18.5858 0.585787 18.25 1 18.25C1.41421 18.25 1.75 18.5858 1.75 19V21C1.75 21.6904 2.30964 22.25 3 22.25H21C21.6904 22.25 22.25 21.6904 22.25 21V19C22.25 18.5858 22.5858 18.25 23 18.25C23.4142 18.25 23.75 18.5858 23.75 19V22C23.75 22.9665 22.9665 23.75 22 23.75H2C1.0335 23.75 0.25 22.9665 0.25 22V19Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 880 B

View File

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13 1.03944C13 0.465371 12.5523 0 12 0C11.4477 0 11 0.465371 11 1.03944V14.371L5.65081 9.60516C5.23148 9.23157 4.60018 9.28204 4.24076 9.71791C3.88134 10.1538 3.9299 10.81 4.34923 11.1836L11.3348 17.4073C11.714 17.7451 12.2861 17.7451 12.6652 17.4073L19.6508 11.1836C20.0701 10.81 20.1187 10.1538 19.7593 9.71791C19.3999 9.28204 18.7686 9.23157 18.3492 9.60516L13 14.371V1.03944Z" fill="white"/>
<path d="M1 18C0.447715 18 0 18.4477 0 19V22C0 23.1046 0.89543 24 2 24H22C23.1046 24 24 23.1046 24 22V19C24 18.4477 23.5523 18 23 18C22.4477 18 22 18.4477 22 19V21C22 21.5523 21.5523 22 21 22H3C2.44772 22 2 21.5523 2 21V19C2 18.4477 1.55228 18 1 18Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 774 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5487 1.40099C11.8159 1.19967 12.1842 1.19967 12.4514 1.40099L23.4377 9.67839C23.7747 9.93233 23.8529 10.4278 23.6041 10.7822C23.3589 11.1314 22.8938 11.2045 22.5622 10.9547L20.7929 9.62164L19.75 20.7362V20.7479C19.75 21.7144 18.9665 22.4979 18 22.4979H6.00014C5.03365 22.4979 4.25014 21.7144 4.25014 20.7479V20.7362L3.20723 9.62157L1.43783 10.9547C1.10624 11.2045 0.641152 11.1314 0.395985 10.7822C0.147197 10.4278 0.22533 9.93233 0.562373 9.67839L11.5487 1.40099ZM12.7522 3.56355C12.3069 3.22803 11.6932 3.22803 11.2479 3.56355L4.73866 8.46775L5.75019 19.6879C5.75655 20.3728 6.31373 20.926 7.00013 20.926H17C17.6864 20.926 18.2436 20.3728 18.25 19.6879L19.2615 8.46783L12.7522 3.56355Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 862 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5881 9.47872L12.6018 1.20132C12.2455 0.932895 11.7545 0.932895 11.3982 1.20132L0.411896 9.47872C-0.0347535 9.81524 -0.133503 10.4631 0.191333 10.9259C0.51617 11.3886 1.14158 11.4909 1.58823 11.1543L3.0001 10.0906L4.0001 20.7479C4.0001 21.8525 4.89554 22.7479 6.00011 22.7479H18C19.1046 22.7479 20 21.8525 20 20.7479L21 10.0907L22.4118 11.1543C22.8584 11.4909 23.4838 11.3886 23.8087 10.9259C24.1335 10.4631 24.0348 9.81524 23.5881 9.47872ZM19 8.58384L12.6017 3.76323C12.2455 3.4948 11.7545 3.49481 11.3983 3.76323L5.00009 8.58376L6.00009 19.676C6.00009 20.2283 6.44781 20.676 7.00009 20.676H17C17.5523 20.676 18 20.2283 18 19.676L19 8.58384Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 814 B

View File

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.75 3C0.75 2.58579 1.08579 2.25 1.5 2.25H22.5C22.9142 2.25 23.25 2.58579 23.25 3C23.25 3.41421 22.9142 3.75 22.5 3.75H1.5C1.08579 3.75 0.75 3.41421 0.75 3Z" fill="#AAAAAA"/>
<path d="M0.75 9C0.75 8.58579 1.08579 8.25 1.5 8.25H22.5C22.9142 8.25 23.25 8.58579 23.25 9C23.25 9.41421 22.9142 9.75 22.5 9.75H1.5C1.08579 9.75 0.75 9.41421 0.75 9Z" fill="#AAAAAA"/>
<path d="M0.75 15C0.75 14.5858 1.08579 14.25 1.5 14.25H22.5C22.9142 14.25 23.25 14.5858 23.25 15C23.25 15.4142 22.9142 15.75 22.5 15.75H1.5C1.08579 15.75 0.75 15.4142 0.75 15Z" fill="#AAAAAA"/>
<path d="M0.75 21C0.75 20.5858 1.08579 20.25 1.5 20.25H14.5C14.9142 20.25 15.25 20.5858 15.25 21C15.25 21.4142 14.9142 21.75 14.5 21.75H1.5C1.08579 21.75 0.75 21.4142 0.75 21Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 861 B

View File

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 2C0.947715 2 0.5 2.44772 0.5 3C0.5 3.55228 0.947716 4 1.5 4H22.5C23.0523 4 23.5 3.55228 23.5 3C23.5 2.44772 23.0523 2 22.5 2H1.5Z" fill="white"/>
<path d="M1.5 8C0.947715 8 0.5 8.44772 0.5 9C0.5 9.55228 0.947716 10 1.5 10H22.5C23.0523 10 23.5 9.55228 23.5 9C23.5 8.44772 23.0523 8 22.5 8H1.5Z" fill="white"/>
<path d="M0.5 15C0.5 14.4477 0.947715 14 1.5 14H22.5C23.0523 14 23.5 14.4477 23.5 15C23.5 15.5523 23.0523 16 22.5 16H1.5C0.947716 16 0.5 15.5523 0.5 15Z" fill="white"/>
<path d="M1.5 20C0.947715 20 0.5 20.4477 0.5 21C0.5 21.5523 0.947715 22 1.5 22H14.5C15.0523 22 15.5 21.5523 15.5 21C15.5 20.4477 15.0523 20 14.5 20H1.5Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 764 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.25 6C0.25 3.92893 1.92893 2.25 4 2.25H20C22.0711 2.25 23.75 3.92893 23.75 6V18C23.75 20.0711 22.0711 21.75 20 21.75H4C1.92893 21.75 0.25 20.0711 0.25 18V6ZM4 3.75C3.47378 3.75 2.98914 3.93095 2.60588 4.23385C2.42273 4.37859 2.35191 4.59023 2.3731 4.7907C2.39379 4.98647 2.50074 5.17163 2.66852 5.29444L11.2617 11.5841C11.7013 11.9059 12.2987 11.9059 12.7383 11.5841L21.3315 5.29444C21.4993 5.17164 21.6062 4.98648 21.6269 4.79071C21.6481 4.59024 21.5773 4.37861 21.3941 4.23386C21.0109 3.93096 20.5262 3.75 20 3.75H4ZM2.54296 7.03896C2.21233 6.7999 1.75 7.03614 1.75 7.44415V18C1.75 19.2426 2.75736 20.25 4 20.25H20C21.2426 20.25 22.25 19.2426 22.25 18V7.44416C22.25 7.03615 21.7877 6.79992 21.457 7.03898L13.0254 13.1354C12.4134 13.5779 11.5866 13.5779 10.9746 13.1354L2.54296 7.03896Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 960 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 6C0 3.79086 1.79086 2 4 2H20C22.2091 2 24 3.79086 24 6V18C24 20.2091 22.2091 22 20 22H4C1.79086 22 0 20.2091 0 18V6ZM4 4H20C20.468 4 20.8984 4.16073 21.2391 4.43C21.4584 4.60331 21.4094 4.92762 21.1838 5.09271L12.5906 11.3824C12.239 11.6398 11.7611 11.6398 11.4094 11.3824L2.81618 5.0927C2.59063 4.92761 2.5416 4.6033 2.76089 4.42999C3.10159 4.16073 3.53203 4 4 4ZM2.39648 7.24156C2.23116 7.12202 2 7.24014 2 7.44415V18C2 19.1046 2.89543 20 4 20H20C21.1046 20 22 19.1046 22 18V7.44416C22 7.24016 21.7688 7.12204 21.6035 7.24157L13.1719 13.338C12.4725 13.8437 11.5276 13.8437 10.8282 13.338L2.39648 7.24156Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 778 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.2532 10C2.2532 4.61522 6.61842 0.25 12.0032 0.25C17.388 0.25 21.7532 4.61522 21.7532 10V12.8445C21.7532 13.6396 21.9049 14.4274 22.2002 15.1657L23.2225 17.7215C23.4196 18.2141 23.0568 18.75 22.5262 18.75H16.7532V19C16.7532 21.6234 14.6266 23.75 12.0032 23.75C9.37985 23.75 7.2532 21.6234 7.2532 19V18.75H1.48023C0.949634 18.75 0.586815 18.2141 0.783874 17.7215L1.80618 15.1657C2.10148 14.4274 2.2532 13.6396 2.2532 12.8445V10ZM12.0032 1.75C7.44685 1.75 3.7532 5.44365 3.7532 10V12.8445C3.7532 13.8305 3.56507 14.8074 3.19889 15.7228L2.58801 17.25H21.4184L20.8075 15.7228C20.4413 14.8074 20.2532 13.8305 20.2532 12.8445V10C20.2532 5.44365 16.5595 1.75 12.0032 1.75ZM15.2532 19V18.75H8.7532V19C8.7532 20.7949 10.2083 22.25 12.0032 22.25C13.7981 22.25 15.2532 20.7949 15.2532 19Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 950 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.00296 19H1.47999C0.772526 19 0.288768 18.2855 0.551513 17.6286L1.57382 15.0729C1.85731 14.3641 2.00296 13.6078 2.00296 12.8445V10C2.00296 4.47715 6.48011 0 12.003 0C17.5258 0 22.003 4.47715 22.003 10V12.8445C22.003 13.6078 22.1486 14.3641 22.4321 15.0728L23.4544 17.6286C23.7171 18.2855 23.2334 19 22.5259 19H17.003C17.003 21.7614 14.7644 24 12.003 24C9.24153 24 7.00296 21.7614 7.00296 19ZM20.5751 15.8156L21.0489 17H2.95702L3.43077 15.8156C3.80876 14.8707 4.00296 13.8623 4.00296 12.8445V10C4.00296 5.58172 7.58468 2 12.003 2C16.4212 2 20.003 5.58172 20.003 10V12.8445C20.003 13.8623 20.1972 14.8707 20.5751 15.8156ZM15.003 19H9.00296C9.00296 20.6569 10.3461 22 12.003 22C13.6598 22 15.003 20.6569 15.003 19Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 882 B

View File

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.25 1C8.25 0.585787 8.58579 0.25 9 0.25C9.41421 0.25 9.75 0.585786 9.75 1V8.25H17C17.4142 8.25 17.75 8.58579 17.75 9C17.75 9.41421 17.4142 9.75 17 9.75H9.75V17C9.75 17.4142 9.41421 17.75 9 17.75C8.58579 17.75 8.25 17.4142 8.25 17V9.75H1C0.585787 9.75 0.25 9.41421 0.25 9C0.25 8.58579 0.585786 8.25 1 8.25H8.25V1Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 443 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.25 9.5C0.25 4.39137 4.39137 0.25 9.5 0.25C14.6086 0.25 18.75 4.39137 18.75 9.5C18.75 11.3929 18.1817 13.1523 17.2064 14.6178L17.093 14.7883L22.4941 20.1894C23.1305 20.8258 23.1305 21.8577 22.4941 22.4941C21.8577 23.1305 20.8258 23.1305 20.1894 22.4941L14.7883 17.093L14.6178 17.2064C13.1523 18.1817 11.3929 18.75 9.5 18.75C4.39137 18.75 0.25 14.6086 0.25 9.5ZM9.5 1.75C5.21979 1.75 1.75 5.21979 1.75 9.5C1.75 13.7802 5.21979 17.25 9.5 17.25C13.7802 17.25 17.25 13.7802 17.25 9.5C17.25 5.21979 13.7802 1.75 9.5 1.75Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 689 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7563 17.4146C13.251 18.4163 11.4437 19 9.5 19C4.25329 19 0 14.7467 0 9.5C0 4.25329 4.25329 0 9.5 0C14.7467 0 19 4.25329 19 9.5C19 11.4437 18.4163 13.251 17.4146 14.7563L22.6709 20.0126C23.4049 20.7467 23.4049 21.9368 22.6709 22.6709C21.9368 23.4049 20.7467 23.4049 20.0126 22.6709L14.7563 17.4146ZM17 9.5C17 13.6421 13.6421 17 9.5 17C5.35786 17 2 13.6421 2 9.5C2 5.35786 5.35786 2 9.5 2C13.6421 2 17 5.35786 17 9.5Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 588 B

View File

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.66237 12C7.66237 9.85005 9.4054 8.10714 11.5552 8.10714C13.7051 8.10714 15.4481 9.85005 15.4481 12C15.4481 14.15 13.7051 15.8929 11.5552 15.8929C9.4054 15.8929 7.66237 14.15 7.66237 12ZM11.5552 9.60714C10.2338 9.60714 9.16237 10.6785 9.16237 12C9.16237 13.3215 10.2338 14.3929 11.5552 14.3929C12.8767 14.3929 13.9481 13.3215 13.9481 12C13.9481 10.6785 12.8767 9.60714 11.5552 9.60714Z" fill="#AAAAAA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.39429 1.32318C8.48228 0.707389 9.00967 0.25 9.63172 0.25H13.4787C14.1008 0.25 14.6282 0.707391 14.7162 1.32318L15.122 4.16335L15.2433 4.22093C15.6644 4.42093 16.0666 4.65405 16.4465 4.91687L16.5571 4.99337L19.2208 3.92412C19.7981 3.69239 20.458 3.92043 20.769 4.45916L22.6925 7.79074C23.0035 8.32948 22.8711 9.01494 22.3818 9.39903L20.1238 11.1713L20.1345 11.3051C20.1529 11.5343 20.1624 11.766 20.1624 12C20.1624 12.2339 20.1529 12.4657 20.1345 12.6948L20.1238 12.8286L22.3818 14.6009C22.8711 14.985 23.0035 15.6704 22.6925 16.2092L20.769 19.5408C20.458 20.0795 19.7982 20.3075 19.2209 20.0758L16.5571 19.0066L16.4465 19.0831C16.0666 19.346 15.6644 19.5791 15.2433 19.7791L15.122 19.8367L14.7162 22.6768C14.6282 23.2926 14.1008 23.75 13.4787 23.75H9.63172C9.00967 23.75 8.48228 23.2926 8.39429 22.6768L7.98845 19.8367L7.86719 19.7791C7.44599 19.5791 7.04359 19.3459 6.66356 19.083L6.55298 19.0065L3.88922 20.0758C3.31193 20.3075 2.65208 20.0795 2.34105 19.5407L0.417555 16.2091C0.106527 15.6704 0.238952 14.985 0.728265 14.6009L2.98635 12.8284L2.97568 12.6947C2.95739 12.4654 2.94808 12.2337 2.94808 12C2.94808 11.7663 2.95739 11.5346 2.97569 11.3053L2.98636 11.1716L0.728241 9.399C0.238943 9.01491 0.106527 8.32948 0.41755 7.79077L2.34106 4.45914C2.65208 3.92043 3.3119 3.69239 3.88919 3.92409L6.55333 4.99337L6.66391 4.91686C7.04383 4.65401 7.44607 4.4209 7.86719 4.22093L7.98845 4.16334L8.39429 1.32318ZM13.2619 1.75H9.84853L9.37231 5.08279C9.3596 5.17171 9.30018 5.24697 9.21664 5.27996L8.9464 5.38667C8.28924 5.64615 7.67959 6.00096 7.13491 6.43438L6.90729 6.6155C6.83694 6.67148 6.74195 6.68537 6.65851 6.65189L3.53169 5.39691L1.825 8.35299L4.47381 10.4323C4.54437 10.4877 4.57985 10.5767 4.56677 10.6654L4.52448 10.9524C4.47417 11.2938 4.44808 11.6436 4.44808 12C4.44808 12.3564 4.47417 12.7062 4.52448 13.0476L4.56677 13.3346C4.57985 13.4234 4.54437 13.5123 4.47381 13.5677L1.825 15.6469L3.53168 18.603L6.65811 17.348C6.74154 17.3145 6.83654 17.3284 6.9069 17.3844L7.13452 17.5655C7.67914 17.9989 8.28918 18.3538 8.9464 18.6133L9.21664 18.72C9.30018 18.753 9.3596 18.8283 9.37231 18.9172L9.84853 22.25H13.2619L13.7381 18.9172C13.7508 18.8283 13.8103 18.753 13.8938 18.72L14.1641 18.6133C14.8212 18.3539 15.4309 17.999 15.9755 17.5656L16.2032 17.3845C16.2735 17.3285 16.3685 17.3146 16.452 17.3481L19.5784 18.603L21.2851 15.6469L18.6363 13.5679C18.5657 13.5125 18.5302 13.4236 18.5433 13.3348L18.5856 13.0478C18.636 12.7058 18.6624 12.356 18.6624 12C18.6624 11.644 18.636 11.2942 18.5856 10.9521L18.5433 10.6651C18.5302 10.5763 18.5657 10.4874 18.6363 10.432L21.2851 8.35296L19.5784 5.39693L16.452 6.65188C16.3686 6.68537 16.2736 6.67148 16.2032 6.61551L15.9756 6.43443C15.4309 6.00104 14.8212 5.64613 14.1641 5.38667L13.8938 5.27996C13.8103 5.24697 13.7508 5.17171 13.7381 5.08279L13.2619 1.75Z" fill="#AAAAAA"/>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.14682 1.28782C8.25241 0.548867 8.88528 0 9.63173 0H13.4788C14.2252 0 14.8581 0.548869 14.9637 1.28782L15.3505 3.99511C15.7839 4.20093 16.1978 4.44084 16.5887 4.71127L19.1277 3.69212C19.8205 3.41404 20.6123 3.68768 20.9855 4.33416L22.909 7.66574C23.2823 8.31223 23.1233 9.13478 22.5361 9.59569L20.3838 11.2851C20.4027 11.5209 20.4124 11.7593 20.4124 12C20.4124 12.2406 20.4027 12.479 20.3838 12.7148L22.5361 14.4042C23.1233 14.8651 23.2823 15.6877 22.909 16.3342L20.9855 19.6658C20.6123 20.3122 19.8205 20.5859 19.1278 20.3078L16.5888 19.2887C16.1978 19.5592 15.7839 19.7991 15.3505 20.0049L14.9637 22.7122C14.8581 23.4511 14.2252 24 13.4788 24H9.63173C8.88528 24 8.25241 23.4511 8.14682 22.7122L7.75997 20.0049C7.3265 19.7991 6.9124 19.5592 6.52134 19.2886L3.98237 20.3078C3.28961 20.5859 2.4978 20.3122 2.12456 19.6657L0.201065 16.3341C-0.172169 15.6877 -0.0132584 14.8652 0.573917 14.4042L2.72649 12.7145C2.70767 12.4787 2.6981 12.2403 2.6981 12C2.6981 11.7597 2.70767 11.5213 2.72649 11.2854L0.573889 9.59565C-0.0132678 9.13473 -0.172168 8.31222 0.20106 7.66577L2.12457 4.33414C2.4978 3.68769 3.28957 3.41404 3.98232 3.69208L6.52169 4.71127C6.91263 4.44079 7.32657 4.2009 7.75997 3.99509L8.14682 1.28782ZM10.0654 2L9.61981 5.11816C9.5944 5.29599 9.47555 5.44652 9.30847 5.51249L9.03823 5.6192C8.40436 5.86948 7.81618 6.21178 7.29059 6.63L7.06297 6.81112C6.92227 6.92309 6.73228 6.95087 6.56541 6.8839L3.6398 5.70968L2.14993 8.29023L4.6282 10.2357C4.76932 10.3464 4.84027 10.5244 4.81412 10.7019L4.77182 10.9889C4.72329 11.3182 4.6981 11.6558 4.6981 12C4.6981 12.3442 4.72329 12.6818 4.77182 13.0111L4.81412 13.2982C4.84028 13.4757 4.76932 13.6536 4.62819 13.7643L2.14994 15.7097L3.63979 18.2902L6.56499 17.116C6.73187 17.049 6.92187 17.0768 7.06258 17.1888L7.2902 17.3699C7.81572 17.7881 8.40427 18.1305 9.03823 18.3808L9.30847 18.4875C9.47555 18.5535 9.5944 18.704 9.61981 18.8818L10.0654 22H13.0451L13.4907 18.8818C13.5161 18.704 13.6349 18.5535 13.802 18.4875L14.0723 18.3808C14.7061 18.1305 15.2943 17.7882 15.8199 17.37L16.0475 17.1889C16.1882 17.0769 16.3782 17.0491 16.5451 17.1161L19.4703 18.2902L20.9601 15.7097L18.4819 13.7646C18.3408 13.6538 18.2698 13.4759 18.296 13.2984L18.3383 13.0113C18.3869 12.6813 18.4124 12.3436 18.4124 12C18.4124 11.6564 18.3869 11.3187 18.3383 10.9885L18.296 10.7015C18.2699 10.524 18.3408 10.3461 18.4819 10.2353L20.9601 8.29018L19.4703 5.70971L16.5451 6.88388C16.3783 6.95086 16.1883 6.92309 16.0476 6.81115L15.82 6.63006C15.2943 6.21184 14.7061 5.86946 14.0723 5.6192L13.802 5.51249C13.6349 5.44652 13.5161 5.29599 13.4907 5.11816L13.0451 2H10.0654ZM11.5552 9.85714C10.3719 9.85714 9.41239 10.8166 9.41239 12C9.41239 13.1834 10.3719 14.1429 11.5552 14.1429C12.7386 14.1429 13.6981 13.1834 13.6981 12C13.6981 10.8166 12.7386 9.85714 11.5552 9.85714ZM7.41239 12C7.41239 9.71197 9.26735 7.85714 11.5552 7.85714C13.8431 7.85714 15.6981 9.71197 15.6981 12C15.6981 14.288 13.8431 16.1429 11.5552 16.1429C9.26735 16.1429 7.41239 14.288 7.41239 12Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -39,44 +39,96 @@
.homeIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/home.svg) no-repeat center;
mask: url(../../assets/icons/home.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/home.svg) no-repeat center;
mask: url(../../assets/icons/nav/home.svg) no-repeat center;
}
.readsIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/nav/long.svg) no-repeat center;
mask: url(../../assets/icons/nav/long.svg) no-repeat center;
}
.exploreIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/search.svg) no-repeat center;
mask: url(../../assets/icons/search.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/search.svg) no-repeat center;
mask: url(../../assets/icons/nav/search.svg) no-repeat center;
}
.messagesIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/messages.svg) no-repeat center;
mask: url(../../assets/icons/messages.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/messages.svg) no-repeat center;
mask: url(../../assets/icons/nav/messages.svg) no-repeat center;
}
.notificationsIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/notifications.svg) no-repeat center;
mask: url(../../assets/icons/notifications.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/notifications.svg) no-repeat center;
mask: url(../../assets/icons/nav/notifications.svg) no-repeat center;
}
.downloadIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/download.svg) no-repeat center;
mask: url(../../assets/icons/download.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/downloads.svg) no-repeat center;
mask: url(../../assets/icons/nav/downloads.svg) no-repeat center;
}
.settingsIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/settings.svg) no-repeat center;
mask: url(../../assets/icons/settings.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/settings.svg) no-repeat center;
mask: url(../../assets/icons/nav/settings.svg) no-repeat center;
}
.helpIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/help.svg) no-repeat center;
mask: url(../../assets/icons/help.svg) no-repeat center;
-webkit-mask: url(../../assets/icons/nav/help.svg) no-repeat center;
mask: url(../../assets/icons/nav/help.svg) no-repeat center;
}
.bookmarkIcon {
@include iconNav;
-webkit-mask: url(../../assets/icons/bookmark_empty.svg) no-repeat 0 / auto 100%;
mask: url(../../assets/icons/bookmark_empty.svg) no-repeat center 0 / auto 100%;
-webkit-mask: url(../../assets/icons/nav/bookmarks.svg) no-repeat 0 / auto 100%;
mask: url(../../assets/icons/nav/bookmarks.svg) no-repeat center 0 / auto 100%;
}
&:hover, a.active {
.homeIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/home_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/home_selected.svg) no-repeat center;
}
.readsIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/long_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/long_selected.svg) no-repeat center;
}
.exploreIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/search_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/search_selected.svg) no-repeat center;
}
.messagesIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/messages_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/messages_selected.svg) no-repeat center;
}
.notificationsIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/notifications_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/notifications_selected.svg) no-repeat center;
}
.downloadIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/downloads_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/downloads_selected.svg) no-repeat center;
}
.settingsIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/settings_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/settings_selected.svg) no-repeat center;
}
.helpIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/help_selected.svg) no-repeat center;
mask: url(../../assets/icons/nav/help_selected.svg) no-repeat center;
}
.bookmarkIcon {
background-color: var(--text-primary);
-webkit-mask: url(../../assets/icons/nav/bookmarks_selected.svg) no-repeat 0 / auto 100%;
mask: url(../../assets/icons/nav/bookmarks_selected.svg) no-repeat center 0 / auto 100%;
}
}
.active {

View File

@ -27,6 +27,11 @@ const NavMenu: Component< { id?: string } > = (props) => {
label: intl.formatMessage(t.home),
icon: 'homeIcon',
},
{
to: '/reads',
label: intl.formatMessage(t.reads),
icon: 'readsIcon',
},
{
to: '/explore',
label: intl.formatMessage(t.explore),

View File

@ -0,0 +1,274 @@
import { nip19 } from "nostr-tools";
import { createContext, createEffect, onCleanup, useContext } from "solid-js";
import { createStore, reconcile, unwrap } from "solid-js/store";
import { APP_ID } from "../App";
import { Kind } from "../constants";
import { getArticlesFeed, getEvents, getExploreFeed, getFeed, getFutureExploreFeed, getFutureFeed } from "../lib/feed";
import { fetchStoredFeed, saveStoredFeed } from "../lib/localStore";
import { setLinkPreviews } from "../lib/notes";
import { getScoredUsers, searchContent } from "../lib/search";
import { isConnected, refreshSocketListeners, removeSocketListeners, socket, subscribeTo, subsTo } from "../sockets";
import { sortingPlan, convertToNotes, parseEmptyReposts, paginationPlan, isInTags, isRepostInCollection } from "../stores/note";
import {
ContextChildren,
FeedPage,
NostrEOSE,
NostrEvent,
NostrEventContent,
NostrMentionContent,
NostrNoteActionsContent,
NostrNoteContent,
NostrStatsContent,
NostrUserContent,
NoteActions,
PrimalArticle,
PrimalFeed,
PrimalNote,
SelectionOption,
TopZap,
} from "../types/primal";
import { parseBolt11 } from "../utils";
import { useAccountContext } from "./AccountContext";
import { useSettingsContext } from "./SettingsContext";
type Event = any;
type EventPage = Record<number, {
events: Event[],
since: number,
until: number,
}>;
type ReadsContextData = {
events: Record<number, Event[]>,
pages: EventPage[],
currentPageNumber: number,
}
type ReadsContextStore = ReadsContextData & {
actions: {
fetchPage: (page: number, kind: number) => void;
}
}
const initialData: ReadsContextData = {
events: {},
pages: [],
currentPageNumber: 0,
};
export const ReadsContext = createContext<ReadsContextStore>();
export const ReadsProvider = (props: { children: ContextChildren }) => {
const settings = useSettingsContext();
const account = useAccountContext();
const handleEvent = (event: NostrEventContent, page: number) => {
const { kind, content } = event;
if (!store.pages[page]) {
updateStore('pages', page, {})
}
if (!store.pages[page][kind]) {
updateStore('pages', page, { [kind]: { events: [], since: 0, until: 0 }})
}
updateStore('pages', page, kind, 'events', (es) => [...es, content]);
};
const handleEose = (page: number) => {
console.log('STORE: ', store.pages);
};
// ACTIONS --------------------------------------
const fetchPage = (page: number, kind: number) => {
const subId = `e_${kind}_${page}_${APP_ID}`;
const unsub = subsTo(subId, {
onEvent: (_, content) => {
handleEvent(content, page);
},
onEose: (_) => {
handleEose(page);
unsub();
},
onNotice: (_, reason) => {},
});
const until = 0;
const limit = 10;
const offset = 0;
if (kind === Kind.LongForm) {
getArticlesFeed(
account?.publicKey,
account?.publicKey,
subId,
until,
limit,
offset,
)
}
};
// SOCKET HANDLERS ------------------------------
// const onMessage = (event: MessageEvent) => {
// const message: NostrEvent | NostrEOSE = JSON.parse(event.data);
// const [type, subId, content] = message;
// if (subId === `home_sidebar_${APP_ID}`) {
// if (type === 'EOSE') {
// saveSidebarPage(store.sidebar.page);
// return;
// }
// if (!content) {
// return;
// }
// if (type === 'EVENT') {
// updateSidebarPage(content);
// return;
// }
// }
// if (subId === `home_feed_${APP_ID}`) {
// if (type === 'EOSE') {
// const reposts = parseEmptyReposts(store.page);
// const ids = Object.keys(reposts);
// if (ids.length === 0) {
// savePage(store.page);
// return;
// }
// updateStore('reposts', () => reposts);
// getEvents(account?.publicKey, ids, `home_reposts_${APP_ID}`);
// return;
// }
// if (type === 'EVENT') {
// updatePage(content);
// return;
// }
// }
// if (subId === `home_reposts_${APP_ID}`) {
// if (type === 'EOSE') {
// savePage(store.page);
// return;
// }
// if (type === 'EVENT') {
// const repostId = (content as NostrNoteContent).id;
// const reposts = store.reposts || {};
// const parent = store.page.messages.find(m => m.id === reposts[repostId]);
// if (parent) {
// updateStore('page', 'messages', (msg) => msg.id === parent.id, 'content', () => JSON.stringify(content));
// }
// return;
// }
// }
// if (subId === `home_future_${APP_ID}`) {
// if (type === 'EOSE') {
// const reposts = parseEmptyReposts(store.future.page);
// const ids = Object.keys(reposts);
// if (ids.length === 0) {
// savePage(store.future.page, 'future');
// return;
// }
// updateStore('future', 'reposts', () => reposts);
// getEvents(account?.publicKey, ids, `home_future_reposts_${APP_ID}`);
// return;
// }
// if (type === 'EVENT') {
// updatePage(content, 'future');
// return;
// }
// }
// if (subId === `home_future_reposts_${APP_ID}`) {
// if (type === 'EOSE') {
// savePage(store.future.page, 'future');
// return;
// }
// if (type === 'EVENT') {
// const repostId = (content as NostrNoteContent).id;
// const reposts = store.future.reposts || {};
// const parent = store.future.page.messages.find(m => m.id === reposts[repostId]);
// if (parent) {
// updateStore('future', 'page', 'messages', (msg) => msg.id === parent.id, 'content', () => JSON.stringify(content));
// }
// return;
// }
// }
// };
// const onSocketClose = (closeEvent: CloseEvent) => {
// const webSocket = closeEvent.target as WebSocket;
// removeSocketListeners(
// webSocket,
// { message: onMessage, close: onSocketClose },
// );
// };
// EFFECTS --------------------------------------
// createEffect(() => {
// if (isConnected()) {
// refreshSocketListeners(
// socket(),
// { message: onMessage, close: onSocketClose },
// );
// }
// });
// onCleanup(() => {
// removeSocketListeners(
// socket(),
// { message: onMessage, close: onSocketClose },
// );
// });
// STORES ---------------------------------------
const [store, updateStore] = createStore<ReadsContextStore>({
...initialData,
actions: {
fetchPage,
},
});
// RENDER -------------------------------------
return (
<ReadsContext.Provider value={store}>
{props.children}
</ReadsContext.Provider>
);
}
export const useReadsContext = () => useContext(ReadsContext);

View File

@ -126,6 +126,27 @@ a {
border: 2px solid red;
}
body::after{
position:absolute; width:0; height:0; overflow:hidden; z-index:-1; // hide images
content:
url(./assets/icons/nav/bookmarks.svg)
url(./assets/icons/nav/bookmarks_selected.svg)
url(./assets/icons/nav/home.svg)
url(./assets/icons/nav/home_selected.svg)
url(./assets/icons/nav/search.svg)
url(./assets/icons/nav/search_selected.svg)
url(./assets/icons/nav/messages.svg)
url(./assets/icons/nav/messages_selected.svg)
url(./assets/icons/nav/notifications.svg)
url(./assets/icons/nav/notifications_selected.svg)
url(./assets/icons/nav/downloads.svg)
url(./assets/icons/nav/downloads_selected.svg)
url(./assets/icons/nav/settings.svg)
url(./assets/icons/nav/settings_selected.svg)
url(./assets/icons/nav/long.svg)
url(./assets/icons/nav/long_selected.svg);
}
.reply_icon {
-webkit-mask: url(./assets/icons/feed_reply.svg) no-repeat 0 / 100%;
mask: url(./assets/icons/feed_reply_fill.svg) no-repeat 0 / 100%;

View File

@ -46,6 +46,26 @@ export const getFeed = (user_pubkey: string | undefined, pubkey: string | undef
]));
}
export const getArticlesFeed = (user_pubkey: string | undefined, pubkey: string | undefined, subid: string, until = 0, limit = 20, offset=0) => {
if (!pubkey) {
return;
}
const start = until === 0 ? 'since' : 'until';
let payload = { limit, [start]: until, pubkey, offset };
if (user_pubkey) {
payload.user_pubkey = user_pubkey;
}
sendMessage(JSON.stringify([
"REQ",
subid,
{cache: ["long_form_content_feed", payload]},
]));
}
export const getEvents = (user_pubkey: string | undefined, eventIds: string[], subid: string, extendResponse?: boolean) => {
let payload: {event_ids: string[], user_pubkey?: string, extended_response?: boolean } =

65
src/pages/Reads.tsx Normal file
View File

@ -0,0 +1,65 @@
import {
Component,
createEffect,
createSignal,
For,
Match,
onCleanup,
onMount,
Show,
Switch
} from 'solid-js';
import Note from '../components/Note/Note';
import styles from './Home.module.scss';
import HomeHeader from '../components/HomeHeader/HomeHeader';
import Loader from '../components/Loader/Loader';
import Paginator from '../components/Paginator/Paginator';
import HomeSidebar from '../components/HomeSidebar/HomeSidebar';
import Branding from '../components/Branding/Branding';
import HomeHeaderPhone from '../components/HomeHeaderPhone/HomeHeaderPhone';
import Wormhole from '../components/Wormhole/Wormhole';
import { scrollWindowTo } from '../lib/scroll';
import StickySidebar from '../components/StickySidebar/StickySidebar';
import { useHomeContext } from '../contexts/HomeContext';
import { useIntl } from '@cookbook/solid-intl';
import { createStore } from 'solid-js/store';
import { PrimalUser } from '../types/primal';
import Avatar from '../components/Avatar/Avatar';
import { userName } from '../stores/profile';
import { useAccountContext } from '../contexts/AccountContext';
import { reads as tReads, branding } from '../translations';
import Search from '../components/Search/Search';
import { setIsHome } from '../components/Layout/Layout';
import PageTitle from '../components/PageTitle/PageTitle';
import { useAppContext } from '../contexts/AppContext';
import PageCaption from '../components/PageCaption/PageCaption';
import { useReadsContext } from '../contexts/ReadsContext';
import { Kind } from '../constants';
const Reads: Component = () => {
const intl = useIntl();
const reads = useReadsContext();
onMount(() => {
reads?.actions.fetchPage(0, Kind.LongForm);
});
return (
<div class={styles.homeContent}>
<PageTitle title={intl.formatMessage(branding)} />
<PageCaption title={intl.formatMessage(tReads.pageTitle)} />
<Wormhole
to="search_section"
>
<Search />
</Wormhole>
</div>
)
}
export default Reads;

View File

@ -1,6 +1,6 @@
import { createSignal } from "solid-js";
import { logError, logInfo } from "./lib/logger";
import { NostrEvent, NostrEOSE, NostrEventType, NostrEventContent, PrimalWindow } from "./types/primal";
import { NostrEvent, NostrEOSE, NostrEventType, NostrEventContent, PrimalWindow, NostrNotice } from "./types/primal";
export const [socket, setSocket] = createSignal<WebSocket>();
@ -142,3 +142,39 @@ export const subTo = (socket: WebSocket, subId: string, cb: (type: NostrEventTyp
socket.removeEventListener('message', listener);
};
};
export const subsTo = (
subId: string,
handlers?: {
onEvent?: (subId: string, content: NostrEventContent) => void,
onNotice?: (subId: string, reason: string) => void,
onEose?: (subId: string) => void,
},
) => {
const listener = (event: MessageEvent) => {
const message: NostrEvent | NostrEOSE | NostrNotice = JSON.parse(event.data);
const [type, subscriptionId] = message;
if (handlers && subId === subscriptionId) {
if (type === 'EVENT') {
handlers.onEvent && handlers.onEvent(subscriptionId, message[2]);
}
if (type === 'EOSE') {
handlers.onEose && handlers.onEose(subscriptionId);
}
if (type === 'NOTICE') {
handlers.onNotice && handlers.onNotice(subscriptionId, message[2])
}
}
};
socket()?.addEventListener('message', listener);
return () => {
socket()?.removeEventListener('message', listener);
};
};

View File

@ -709,6 +709,11 @@ export const navBar = {
defaultMessage: 'Home',
description: 'Label for the nav bar item link to Home page',
},
reads: {
id: 'navbar.reads',
defaultMessage: 'Reads',
description: 'Label for the nav bar item link to Reads page',
},
explore: {
id: 'navbar.explore',
defaultMessage: 'Explore',
@ -2127,6 +2132,14 @@ export const followWarning = {
},
};
export const reads = {
pageTitle: {
id: 'reads.pageTitle',
defaultMessage: 'Reads',
description: 'Reads page title',
},
};
export const bookmarks = {
pageTitle: {
id: 'bookmarks.pageTitle',

17
src/types/primal.d.ts vendored
View File

@ -279,6 +279,12 @@ export type NostrEOSE = [
subkey: string,
];
export type NostrNotice = [
type: "NOTICE",
subkey: string,
reason: string,
];
export type NoteActions = {
event_id: string,
liked: boolean,
@ -486,6 +492,17 @@ export type PrimalNote = {
topZaps: TopZap[],
};
export type PrimalArticle = {
title: string,
summary: string,
image: string,
tags: string[],
published: number,
content: string,
author: PrimalUser,
topZaps: TopZap[],
};
export type PrimalFeed = {
name: string,
npub?: string,