diff --git a/app/components/prediction_component.html.erb b/app/components/prediction_component.html.erb
index d77b2da0..9aa984e8 100644
--- a/app/components/prediction_component.html.erb
+++ b/app/components/prediction_component.html.erb
@@ -1,11 +1,11 @@
- <%= @prediction.name %>
+ <%= name_for_label %>
●
- <%= @prediction.daqi_label %>
+ <%= daqi_level_for_label %>
<%= render partial: "shared/icons/chevron_down" %>
diff --git a/app/components/prediction_component.rb b/app/components/prediction_component.rb
index ebde1945..faebd48b 100644
--- a/app/components/prediction_component.rb
+++ b/app/components/prediction_component.rb
@@ -9,10 +9,18 @@ def name_for_class
@prediction.name.parameterize
end
+ def name_for_label
+ @prediction.name
+ end
+
def daqi_level_for_class
@prediction.daqi_level.to_s.parameterize
end
+ def daqi_level_for_label
+ @prediction.daqi_label
+ end
+
def daqi_indicator_colour
case @prediction.daqi_level
when :low
diff --git a/app/models/pollen_prediction.rb b/app/models/pollen_prediction.rb
index b9d8e508..a711159f 100644
--- a/app/models/pollen_prediction.rb
+++ b/app/models/pollen_prediction.rb
@@ -7,6 +7,10 @@ def initialize(value)
@value = value
end
+ def name
+ "Pollen"
+ end
+
def guidance
I18n.t("prediction.guidance.pollen.#{daqi_level}")
end
diff --git a/app/models/temperature_prediction.rb b/app/models/temperature_prediction.rb
index 8cfcbb71..cc6a2ac9 100644
--- a/app/models/temperature_prediction.rb
+++ b/app/models/temperature_prediction.rb
@@ -6,6 +6,10 @@ def initialize(min:, max:)
@max = max
end
+ def name
+ "Temperature"
+ end
+
# :nocov:
def inspect
"#<#{self.class.name} @min=#{min} @max=#{max}>"
diff --git a/app/models/uv_prediction.rb b/app/models/uv_prediction.rb
index bade22ef..5b4f7909 100644
--- a/app/models/uv_prediction.rb
+++ b/app/models/uv_prediction.rb
@@ -7,6 +7,10 @@ def initialize(value)
@value = value
end
+ def name
+ "Ultravoilet rays (UV)"
+ end
+
def guidance
I18n.t("prediction.guidance.uv.#{daqi_level}")
end
diff --git a/app/views/styled_forecasts/_predictions.html.erb b/app/views/styled_forecasts/_predictions.html.erb
index 202e24e4..6f40a31f 100644
--- a/app/views/styled_forecasts/_predictions.html.erb
+++ b/app/views/styled_forecasts/_predictions.html.erb
@@ -1,40 +1,5 @@
-
-
-
- Ultravoilet rays (UV)
-
-
-
●
- Low
- <%= render partial: "shared/icons/chevron_down" %>
-
-
-
-
-
-
-
-
- Pollen
-
-
-
●
- Moderate
- <%= render partial: "shared/icons/chevron_down" %>
-
-
-
- <%= render partial: "details" %>
-
-
-
-
-
- Temperature
-
-
-
●
- Low
- <%= render partial: "shared/icons/chevron_down" %>
-
-
-
-
-
-
+ <%= render(PredictionComponent.new(prediction: @forecasts.first.uv)) %>
+ <%= render(PredictionComponent.new(prediction: @forecasts.first.pollen)) %>
+ <%= render "temperature_prediction", prediction: @forecasts.first.temperature %>
diff --git a/app/views/styled_forecasts/_temperature_prediction.html.erb b/app/views/styled_forecasts/_temperature_prediction.html.erb
new file mode 100644
index 00000000..05bcb1a5
--- /dev/null
+++ b/app/views/styled_forecasts/_temperature_prediction.html.erb
@@ -0,0 +1,9 @@
+