<script lang="ts">
    import { getPrototypeArticles } from "../../api"

    import Sidebar from "../page/Sidebar.svelte"
    import PrototypeArticle from "../page/PrototypeArticle.svelte"

    let articles: PrototypeArticle[] | []

    const getArticles = async () => {
        articles = await getPrototypeArticles()
    }
    getArticles()
    
</script>

<div class="container">
    <div class="row">
        <div class="col-md-10">
            
            <div>
                {#each articles || [] as article}
                    <PrototypeArticle article="{article}" />
                {/each}
            </div>

        </div>
        <div class="col-md-2">
            <Sidebar />
        </div>
    </div>
</div>
