@@ -29,33 +29,7 @@ export const TrackPageInner: React.FC = () => {
29
29
const { slug : trackSlug } = useParams ( ) ;
30
30
if ( ! trackSlug ) throw new Error ( "?" ) ; // XXX:
31
31
32
- const { data : conferenceData , error : conferenceError , mutate : mutateConferenceData } = Api . useConference ( ) ;
33
-
34
- React . useEffect ( ( ) => {
35
- if ( ! conferenceData ) return ;
36
- if ( conferenceData . requested_at === 0 ) return ; // Partially mutated by consumeIvsMetadata
37
-
38
- const now = dayjs ( ) ;
39
- const isStale = conferenceData . stale_after && conferenceData . stale_after - 2 <= now . unix ( ) ;
40
- console . log ( "conferenceData freshness" , {
41
- isStale,
42
- now : now . toISOString ( ) ,
43
- at : dayjs . unix ( conferenceData . requested_at ) . toISOString ( ) ,
44
- stale_after : dayjs . unix ( conferenceData . stale_after ) . toISOString ( ) ,
45
- } ) ;
46
-
47
- if ( isStale ) {
48
- console . log ( "conferenceData is stale; request revalidation" ) ;
49
- mutateConferenceData ( ) ;
50
- const interval = setInterval ( ( ) => {
51
- console . log ( "Revalidating stale conferenceData..." ) ;
52
- mutateConferenceData ( ) ;
53
- } , 1000 ) ;
54
- return ( ) => clearInterval ( interval ) ;
55
- } else {
56
- console . log ( "conferenceData is fresh!" ) ;
57
- }
58
- } , [ conferenceData ?. requested_at , conferenceData ?. stale_after ] ) ;
32
+ const { data : conferenceData , error : conferenceError } = Api . useConference ( ) ;
59
33
60
34
if ( ! conferenceData ) {
61
35
return (
0 commit comments