We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ec0abc commit 886d647Copy full SHA for 886d647
site/pages/projects/index.tsx
@@ -19,13 +19,9 @@ const ProjectsPage: React.FC = () => {
19
const styles = useStyles()
20
const router = useRouter()
21
const { me, signOut } = useUser(true)
22
- const { data, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
+ const { data: projects, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
23
const { data: orgs, error: orgsError } = useSWR<Organization[], Error>("/api/v2/users/me/organizations")
24
25
- // TODO: The API call is currently returning `null`, which isn't ideal
26
- // - it breaks checking for data presence with SWR.
27
- const projects = data || []
28
-
29
if (error) {
30
return <ErrorSummary error={error} />
31
}
0 commit comments