Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions site/pages/projects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ const ProjectsPage: React.FC = () => {
const styles = useStyles()
const router = useRouter()
const { me, signOut } = useUser(true)
const { data, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
const { data: projects, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
const { data: orgs, error: orgsError } = useSWR<Organization[], Error>("/api/v2/users/me/organizations")

// TODO: The API call is currently returning `null`, which isn't ideal
// - it breaks checking for data presence with SWR.
const projects = data || []

if (error) {
return <ErrorSummary error={error} />
}
Expand Down