Skip to content

Commit 886d647

Browse files
committed
Remove now-unnecessary hack in projects page
1 parent 7ec0abc commit 886d647

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

site/pages/projects/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@ const ProjectsPage: React.FC = () => {
1919
const styles = useStyles()
2020
const router = useRouter()
2121
const { me, signOut } = useUser(true)
22-
const { data, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
22+
const { data: projects, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
2323
const { data: orgs, error: orgsError } = useSWR<Organization[], Error>("/api/v2/users/me/organizations")
2424

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-
2925
if (error) {
3026
return <ErrorSummary error={error} />
3127
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy