anthonymidili/Bullhorn

View on GitHub
app/views/posts/new.html.haml

Summary

Maintainability
Test Coverage
= turbo_frame_tag "new_post" do
  .modal
    .modal_content
      .row.center-content
        .col-12
          - if @reposting
            = link_to select_reposts_path(repost: { post_id: @reposting.id }), 
            class: "close-btn", title: 'Close' do
              %i.fa-solid.fa-xmark
            %h1 New Repost
          - else
            = link_to root_path(new_link: true), class: "close-btn", 
            data: { turbo_stream: "new_post" }, title: 'Close' do
              %i.fa-solid.fa-xmark
            %h1 New Post
          = render 'form', post: @post
          - if @reposting
            %h3 Reposting Post
            = render @reposting, quoted_post_form: true