-
- {events[0].content &&
}
+
+
+
+
+
-
-
- {events[0].content && }
-
-
-
+
+ {events[0].content &&
}
+
);
} else {
return (
diff --git a/src/components/note/single.tsx b/src/components/note/single.tsx
index e6d56b59..926bf63b 100644
--- a/src/components/note/single.tsx
+++ b/src/components/note/single.tsx
@@ -1,30 +1,12 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Content } from '@components/note/content';
-import * as Dialog from '@radix-ui/react-dialog';
-import dynamic from 'next/dynamic';
import { memo } from 'react';
-const Modal = dynamic(() => import('@components/note/modal'), {
- ssr: false,
- loading: () => <>>,
-});
-
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const Single = memo(function Single({ event }: { event: any }) {
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
);
});
diff --git a/src/pages/feed/following.tsx b/src/pages/feed/following.tsx
index 177b4a4e..790ecdf3 100644
--- a/src/pages/feed/following.tsx
+++ b/src/pages/feed/following.tsx
@@ -15,19 +15,11 @@ import { Virtuoso } from 'react-virtuoso';
export default function Page() {
const { db }: any = useContext(DatabaseContext);
const [data, setData] = useState([]);
+ const [reload, setReload] = useState(false);
const limit = useRef(30);
const offset = useRef(0);
- useEffect(() => {
- const getData = async () => {
- const result = await db.select(`SELECT * FROM cache_notes ORDER BY created_at DESC LIMIT ${limit.current}`);
- setData(result);
- };
-
- getData().catch(console.error);
- }, [db]);
-
const loadMore = useCallback(async () => {
offset.current += limit.current;
// next query
@@ -49,6 +41,15 @@ export default function Page() {
[data]
);
+ useEffect(() => {
+ const getData = async () => {
+ const result = await db.select(`SELECT * FROM cache_notes ORDER BY created_at DESC LIMIT ${limit.current}`);
+ setData(result);
+ };
+
+ getData().catch(console.error);
+ }, [db, reload]);
+
const computeItemKey = useCallback(
(index: string | number) => {
return data[index].id;
@@ -58,7 +59,7 @@ export default function Page() {
return (
-
+