vmbsw

mail@pastecode.io avatar
unknown
javascript
a month ago
615 B
3
Indexable
Never
document.addEventListener('DOMContentLoaded', async function () {
    try {
        // const response = await fetch('/get-logo');
        // if (!response.ok) {
        //     throw new Error('Network response was not ok');
        // }
        // const data = await response.json();

        let data = {
            logoUrl : "/images/Logo-BWS-Only-blue.png"
        }
        
        const baseUrl = window.location.origin;
        document.getElementById('dynamic-logo').src = `${baseUrl}${data.logoUrl}`;

    } catch (error) {
        console.error('Error fetching logo:', error);
    }
});
Leave a Comment