Skip to content

Commit

Permalink
Change usages in places to support ref logic
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Oct 17, 2023
1 parent 634d897 commit 1ba0ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/atlas/src/hooks/useGetAssetUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const useGetAssetUrl = (urls: string[] | undefined | null, type: AssetTyp
const init = async () => {
setUrl(undefined)
setIsLoading(true)
const resolvedUrl = await getSingleAssetUrl(urls, id, type, userBenchmarkTime ?? undefined)
const resolvedUrl = await getSingleAssetUrl(urls, id, type, userBenchmarkTime.current ?? undefined)
setIsLoading(false)
if (resolvedUrl) {
setUrl(resolvedUrl)
Expand Down
3 changes: 1 addition & 2 deletions packages/atlas/src/providers/assets/assets.helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { axiosInstance } from '@/api/axios'
import { BasicMembershipFieldsFragment } from '@/api/queries/__generated__/fragments.generated'
import { BUILD_ENV } from '@/config/env'
import { AssetType } from '@/providers/uploads/uploads.types'
import { ConsoleLogger, DistributorEventEntry, DistributorEventMetric, UserEventsLogger } from '@/utils/logs'
import { wait } from '@/utils/misc'
Expand Down Expand Up @@ -100,7 +99,7 @@ export const logDistributorPerformance = async (assetUrl: string, eventEntry: Di
const performanceEntries = window.performance.getEntriesByName(assetUrl)
const performanceEntry = performanceEntries[0] as PerformanceResourceTiming

if (!performanceEntry && BUILD_ENV === 'production') {
if (!performanceEntry) {
ConsoleLogger.debug('Performance entry not found', { assetUrl })
return
}
Expand Down

0 comments on commit 1ba0ba2

Please sign in to comment.