import { writable } from 'svelte/store'

export default function () {
    const surfers = writable([]);

    async function get() {
        const response = await fetch(`/api/surfers`)
        surfers.set(await response.json())
    }

    get();

    return surfers;
}