[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)
Anton Khorev
notifications at github.com
Wed Aug 14 04:32:15 UTC 2024
@AntonKhorev commented on this pull request.
> + # Log invalid providers
+ invalid_sites.each do |invalid_site|
+ Rails.logger.error("Invalid site or icon not configured: #{invalid_site}")
+ end
+
+ content_tag(
+ :div,
+ :class => "social-share-button d-flex gap-1 align-items-end flex-wrap",
+ :data => {
+ :title => opts[:title],
+ :url => opts[:url],
+ :desc => opts[:desc],
+ :via => opts[:via]
+ }
+ ) do
+ social_buttons = valid_sites.filter_map do |site|
Why assigning to `social_buttons` if you return this value right away?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985#pullrequestreview-2237149844
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4985/review/2237149844 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240813/b036689b/attachment.htm>
More information about the rails-dev
mailing list