diff --git a/src/pages/Development.jsx b/src/pages/Development.jsx index 0160117..10e0a41 100644 --- a/src/pages/Development.jsx +++ b/src/pages/Development.jsx @@ -30,12 +30,72 @@ Copyright (c) 2023 - present | sanguine6660 Copyright (c) 2023 - present | izanagicraft.com Copyright (c) 2023 - present | izanagicraft.com team and contributors */ -import { useEffect } from 'react'; +// import { useEffect } from 'react'; + +// export default function Development() { +// useEffect(() => { +// document.title = '𝑰𝒛𝒂𝒏𝒂𝒈𝒊𝑪𝒓𝒂𝒇𝒕 🌐 | Development'; +// }, []); + +// return
Website Under Development
; +// } + +import React, { useEffect, useState } from 'react'; export default function Development() { + const [data, setData] = useState(null); + useEffect(() => { document.title = '𝑰𝒛𝒂𝒏𝒂𝒈𝒊𝑪𝒓𝒂𝒇𝒕 🌐 | Development'; + + fetch('https://api.izanagicraft.tech/', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({}) + }) + .then((response) => response.json()) + .then((result) => { + setData(result); + }) + .catch((error) => { + console.error('Error fetching data:', error); + }); }, []); - return
Website Under Development
; + return ( +
+

Website Under Development

+
+ {data?.debug?.ping && data?.motd?.html ? ( + data.motd.html.map((line, index) =>

) + ) : ( +

No motd received!

+ )} + + {data?.debug?.ping && data?.players?.online && data?.players?.max ? ( +

+ {data.players.online} / {data.players.max} Players online. +

+ ) : ( +

No Players online.

+ )} + + {data?.links && ( +
+ {Object.keys(data.links).map((key) => ( + + ))} +
+ )} +
+
+ ); }