Skip to content

Commit

Permalink
Merge pull request #678 from clrfund/fix/project-page-spinning
Browse files Browse the repository at this point in the history
Project page keeps spinning if there's no round information
  • Loading branch information
yuetloo authored Jun 9, 2023
2 parents 149b301 + 7037d2e commit 500afdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vue-app/src/views/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ onMounted(async () => {
roundAddress.value = (route.params.address as string) || currentRoundAddress || ''
const registryAddress = await getRecipientRegistryAddress(roundAddress.value)
const registryAddress = await getRecipientRegistryAddress(roundAddress.value || null)
const _project = await getProject(registryAddress, route.params.id as string)
if (_project === null || _project.isHidden) {
// Project not found
Expand Down
8 changes: 3 additions & 5 deletions vue-app/src/views/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
import { ref, computed, onMounted } from 'vue'
import { getCurrentRound, getRoundInfo } from '@/api/round'
import { type Project, getProjects } from '@/api/projects'
import { getFactoryInfo } from '@/api/factory'
import { type Project, getProjects, getRecipientRegistryAddress } from '@/api/projects'
import CallToActionCard from '@/components/CallToActionCard.vue'
import ProjectListItem from '@/components/ProjectListItem.vue'
Expand Down Expand Up @@ -145,9 +144,8 @@ async function loadProjectRoundInfo(roundAddress: string): Promise<ProjectRoundI
}
if (!recipientRegistryAddress) {
// get recipient registry address from the factory if a round does not exist
const factory = await getFactoryInfo()
recipientRegistryAddress = factory.recipientRegistryAddress
// pass null as round address to get recipient registry address from the factory
recipientRegistryAddress = await getRecipientRegistryAddress(null)
}
return { recipientRegistryAddress, startTime, votingDeadline }
Expand Down

0 comments on commit 500afdb

Please sign in to comment.