import { useExamples } from "./api" import styles from "./App.module.css" import Editor from "./Editor" import Tutorial from "./Tutorial" import icon from "./favicon.png" const App = () => { const examples = useExamples() const renderExamples = () => { switch (examples.type) { case "not_yet_requested": case "loading": return
Loading examples...
case "failed": return
An unexpected error occurred while loading examples. See console for details.
case "success": return examples.data.map((example) =>
{example.title}
, ) } } return (
SLAM
A Mere Stack Language
{renderExamples()}
) } export default App