import React from 'react';

declare global {
    interface Window {
        DATA: any;
    }
}

const App: React.FC = () => {
    const data = window.DATA || {};

    console.log('Data from server:', data);  // Add this line for debugging

    return (
        <div className={"flex flex-col items-center"}>
            <header>
                {data['msg'] ? <p>{data['msg']} from <span>pd</span></p> : <p>Welcome to <span>pd</span></p>}
            </header>

            <img src="/public/images/pd.png" alt="pd" width="426" height="261" />

            <footer>
                <p>Generated by pd © 2023. All Rights Reserved.</p>
            </footer>
        </div>
    );
};

export default App;