// Frontend entry point
// This is where your application logic starts
const app = document.getElementById('app');
if (app) {
app.innerHTML = `
NewApproach
Full-stack TypeScript + Hono + TailwindCSS
`;
// temporary: basic API integration example
document.getElementById('fetchBtn').addEventListener('click', async () => {
try {
const response = await fetch('/api/info');
const data = await response.json();
const resultDiv = document.getElementById('result');
const resultContent = document.getElementById('resultContent');
resultContent.textContent = JSON.stringify(data, null, 2);
resultDiv.classList.remove('hidden');
} catch (error) {
console.error('Error fetching API:', error);
}
});
}