File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed
sites/public/src/components/listing Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -310,28 +310,19 @@ export const ListingView = (props: ListingProps) => {
310310 }
311311
312312 let lotterySection
313- if ( publicLottery && ( ! lotteryResults || ( lotteryResults && ! lotteryResults . url ) ) ) {
313+
314+ if (
315+ publicLottery &&
316+ ( ! lotteryResults || ( lotteryResults && ! lotteryResults . url ) ) &&
317+ ( listing . status === ListingsStatusEnum . active || ! lotteryResults )
318+ ) {
314319 lotterySection = publicLottery . startDate && (
315320 < EventSection
316321 headerText = { t ( "listings.publicLottery.header" ) }
317322 sectionHeader = { true }
318323 events = { [ getEvent ( publicLottery ) ] }
319324 />
320325 )
321- if ( dayjs ( publicLottery . startTime ) < dayjs ( ) && lotteryResults && ! lotteryResults . url ) {
322- lotterySection = (
323- < EventSection
324- headerText = { t ( "listings.lotteryResults.header" ) }
325- sectionHeader = { true }
326- events = { [
327- getEvent (
328- lotteryResults ,
329- lotteryResults . note || t ( "listings.lotteryResults.completeResultsWillBePosted" )
330- ) ,
331- ] }
332- />
333- )
334- }
335326 }
336327
337328 const getReservedTitle = ( ) => {
You can’t perform that action at this time.
0 commit comments