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

+1-5
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)