wip
This commit is contained in:
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
|
||||
|
||||
import { useStorage } from '@libs/storage/provider';
|
||||
|
||||
import { useStronghold } from '@stores/stronghold';
|
||||
import { useWidgets } from '@stores/widgets';
|
||||
|
||||
import { useNostr } from '@utils/hooks/useNostr';
|
||||
|
||||
@@ -11,11 +11,11 @@ export function EventLoader({ firstTime }: { firstTime: boolean }) {
|
||||
const { db } = useStorage();
|
||||
const { getAllEventsSinceLastLogin } = useNostr();
|
||||
|
||||
const setIsFetched = useStronghold((state) => state.setIsFetched);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const [progress, setProgress] = useState(0);
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
const setIsFetched = useWidgets((state) => state.setIsFetched);
|
||||
|
||||
useEffect(() => {
|
||||
async function getEvents() {
|
||||
const events = await getAllEventsSinceLastLogin();
|
||||
|
||||
@@ -18,7 +18,7 @@ import { NoteSkeleton } from '@shared/notes/skeleton';
|
||||
import { TitleBar } from '@shared/titleBar';
|
||||
import { EventLoader, WidgetWrapper } from '@shared/widgets';
|
||||
|
||||
import { useStronghold } from '@stores/stronghold';
|
||||
import { useWidgets } from '@stores/widgets';
|
||||
|
||||
import { useNostr } from '@utils/hooks/useNostr';
|
||||
import { toRawEvent } from '@utils/rawEvent';
|
||||
@@ -36,7 +36,7 @@ export function LocalNetworkWidget() {
|
||||
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
||||
});
|
||||
|
||||
const isFetched = useStronghold((state) => state.isFetched);
|
||||
const isFetched = useWidgets((state) => state.isFetched);
|
||||
const dbEvents = useMemo(
|
||||
() => (data ? data.pages.flatMap((d: { data: DBEvent[] }) => d.data) : []),
|
||||
[data]
|
||||
|
||||
Reference in New Issue
Block a user