refactor(Banner): remove redundant debug logs in loadBanner function
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -10,18 +10,11 @@ import "../styles/components/Banner.css"
|
||||
|
||||
async function loadBanner() {
|
||||
try {
|
||||
console.log('Loading banner from:', `${API_BASE}/api/banners/active`);
|
||||
const response = await fetch(`${API_BASE}/api/banners/active`);
|
||||
console.log('Banner response status:', response.status);
|
||||
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
console.log('Banner data:', data);
|
||||
|
||||
if (data.banner) {
|
||||
const container = document.getElementById('banner-container');
|
||||
console.log('Banner container found:', !!container);
|
||||
|
||||
if (container) {
|
||||
container.innerHTML = `
|
||||
<div class="banner-wrapper">
|
||||
@ -30,10 +23,7 @@ import "../styles/components/Banner.css"
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
console.log('Banner displayed successfully');
|
||||
}
|
||||
} else {
|
||||
console.log('No active banner found');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user