I'm new to WP and I want to list all unique authors that have posts in category on the page.

My code (location: wp-content/themes/custom-theme/category.php)

    <div class="container">
					<div class="row">
                            <?php

                            if ( have_posts() ) : ?>

                            <?php while( have_posts() ) : the_author(); ?>
							<div class="col-md-2 text-center">
                                <?php the_author_meta( 'display_name', 30 ); ?>
							</div>
                            <?php endwhile; ?>

                            <?php else: ?>

                                <p class="text-center">No authors</p>

                            <?php endif; ?>
                     </div>
    </div>

This is not giving expected result, can someone help me?

Thanks.