Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import Image from 'next/image';
- export default async function IndexFull() {
- let serverCount: String | null = null;
- async function refreshResponse() {
- try {
- const response = await fetch('http://localhost:3000/api/clientsize', { cache: 'no-store' });
- if (!response.ok) {
- throw new Error('Failed to fetch server count');
- }
- const data = await response.json();
- serverCount = data.count;
- } catch (error) {
- console.error('Error fetching server count:', error);
- }
- }
- await refreshResponse();
- return (
- <>
- //Page context here
- </>
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment