<button class="follow-block-button{%- if include.is_followed %} destructive {% endif -%}" onclick="toggleFollow()">
{%- if include.is_followed -%}
Unfollow
{%- else -%}
Follow
{%- endif -%}
</button>

<script>
    function toggleFollow() {
        window.fetch('{{ global.url }}follow/{{ include.author_id }}', {
            method: 'POST',
        }).then((response) => {
            location.reload();
        });
    }
</script>