From 13b10dd150f9c9cf382fae9802a704ba9c582a62 Mon Sep 17 00:00:00 2001
From: Sam Nystrom <sam@samnystrom.dev>
Date: Sat, 16 Mar 2024 21:07:33 +0000
Subject: fix: remove async useEffect callbacks

---
 src/pages/ProjectsList.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/pages/ProjectsList.tsx')

diff --git a/src/pages/ProjectsList.tsx b/src/pages/ProjectsList.tsx
index 13dd5d6..5efd255 100644
--- a/src/pages/ProjectsList.tsx
+++ b/src/pages/ProjectsList.tsx
@@ -16,8 +16,10 @@ const ProjectsList = ({ user }: ProjectsListProps) => {
 	const projects = useSignal<ListResult<Project> | null>(null);
 	const projectName = useSignal('');
 
-	useEffect(async () => {
-		projects.value = await pb.collection('projects').getList(1, 20, { sort: '-mtime' });
+	useEffect(() => {
+		(async () => {
+			projects.value = await pb.collection('projects').getList(1, 20, { sort: '-mtime' });
+		})();
 	}, []);
 
 	const onCreateProject = useCallback(async (event: SubmitEvent) => {
-- 
cgit v1.2.3

