diff --git a/app/models/competition.rb b/app/models/competition.rb
index f3bd7462d1..3dc5321fb6 100644
--- a/app/models/competition.rb
+++ b/app/models/competition.rb
@@ -2212,6 +2212,10 @@ def serializable_hash(options = nil)
)
end
+ def competitor_count
+ competitors.count
+ end
+
def to_ics
cal = Icalendar::Calendar.new
wcif_ids = rounds.to_h { |r| [r.wcif_id, r.to_string_map] }
diff --git a/app/views/competitions/show.html.erb b/app/views/competitions/show.html.erb
index 9ae89d8ffb..b179fc99b5 100644
--- a/app/views/competitions/show.html.erb
+++ b/app/views/competitions/show.html.erb
@@ -9,7 +9,7 @@
media number_of_bookmarks date_range information on_the_spot_registration? on_the_spot_entry_fee_lowest_denomination
guests_per_registration_limit_enabled? guests_per_registration_limit uses_qualification? allow_registration_without_qualification
events_per_registration_limit_enabled? events_per_registration_limit guests_entry_fee_lowest_denomination all_guests_allowed?
- uses_cumulative? uses_cumulative_across_rounds? uses_cutoff? uses_qualification?]} %>
+ uses_cumulative? uses_cumulative_across_rounds? uses_cutoff? uses_qualification? results_posted? competitor_count]} %>
<%= render layout: 'nav' do %>
<%= react_component("CompetitionTabs", {
tabs: @competition.tabs.as_json,
@@ -19,6 +19,8 @@
only: %w[wca_id unconfirmed_wca_id],
methods: [],
include: [],
- })
+ }),
+ winners: winners(@competition, @competition.main_event),
+ records: records(@competition),
}) %>
<% end %>
diff --git a/app/webpacker/components/CompetitionTabs/GeneralInfoTab.jsx b/app/webpacker/components/CompetitionTabs/GeneralInfoTab.jsx
index 928c7c8b89..9a42af1c53 100644
--- a/app/webpacker/components/CompetitionTabs/GeneralInfoTab.jsx
+++ b/app/webpacker/components/CompetitionTabs/GeneralInfoTab.jsx
@@ -18,9 +18,11 @@ const linkToGoogleMapsPlace = (latitude, longitude) => `https://www.google.com/m
export default function GeneralInfoTab({
competition,
userInfo,
+ records,
+ winners,
}) {
const [showRegistrationRequirements, setShowRegistrationRequirements] = useState(!competition['is_probably_over?']);
- const [showHighlights, setShowHighlights] = useState(false);
+ const [showHighlights, setShowHighlights] = useState(true);
return (
+ {records &&
{winners(competition, competition.mainEvent)}
} - {records &&{records}
} -