import React, { useEffect, useState } from 'react'; import { Server } from '@/api/server/getServer'; import getServers from '@/api/getServers'; import ServerRow from '@/components/dashboard/ServerRow'; import Spinner from '@/components/elements/Spinner'; import PageContentBlock from '@/components/elements/PageContentBlock'; export default () => { const [ servers, setServers ] = useState(null); const loadServers = () => getServers().then(data => setServers(data.items)); useEffect(() => { loadServers(); }, []); if (servers === null) { return ; } return ( {servers.length > 0 ? servers.map(server => ( )) :

It looks like you have no servers.

}
); };