Fix: Finalize settings for NewsCard footer button and fix Ticker images
This commit is contained in:
parent
a31532cb03
commit
48ad517133
@ -10,12 +10,13 @@ async function fetchClasificadosData() {
|
||||
|
||||
// 1. Settings
|
||||
const settingsRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'settings', []);
|
||||
const settings = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {};
|
||||
const settings: any = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {};
|
||||
|
||||
const postsCount = settings.classifieds_count || 9;
|
||||
const cardSettings = {
|
||||
showCategory: settings.news_card_show_category ?? false,
|
||||
showFooterDate: settings.news_card_show_footer_date ?? true,
|
||||
showFooterButton: settings.news_card_show_footer_button ?? true,
|
||||
footerText: settings.news_card_footer_text || ""
|
||||
};
|
||||
|
||||
@ -125,6 +126,7 @@ export default async function ClasificadosPage() {
|
||||
imagenUrl={imagenUrl}
|
||||
showCategory={cardSettings.showCategory}
|
||||
showFooterDate={cardSettings.showFooterDate}
|
||||
showFooterButton={cardSettings.showFooterButton}
|
||||
footerText={cardSettings.footerText}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -10,12 +10,13 @@ async function fetchEventosData() {
|
||||
|
||||
// 1. Settings
|
||||
const settingsRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'settings', []);
|
||||
const settings = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {};
|
||||
const settings: any = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {};
|
||||
|
||||
const postsCount = settings.events_count || 9;
|
||||
const cardSettings = {
|
||||
showCategory: settings.news_card_show_category ?? false,
|
||||
showFooterDate: settings.news_card_show_footer_date ?? true,
|
||||
showFooterButton: settings.news_card_show_footer_button ?? true,
|
||||
footerText: settings.news_card_footer_text || ""
|
||||
};
|
||||
|
||||
@ -125,6 +126,7 @@ export default async function EventosPage() {
|
||||
imagenUrl={imagenUrl}
|
||||
showCategory={cardSettings.showCategory}
|
||||
showFooterDate={cardSettings.showFooterDate}
|
||||
showFooterButton={cardSettings.showFooterButton}
|
||||
footerText={cardSettings.footerText}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -11,12 +11,13 @@ async function fetchHomeData() {
|
||||
|
||||
// 1. Settings
|
||||
const settingsRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'settings', []);
|
||||
const settings = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {};
|
||||
const settings: any = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {};
|
||||
|
||||
const postsCount = settings.feed_count || settings.post_count || 9;
|
||||
const cardSettings = {
|
||||
showCategory: settings.news_card_show_category ?? false,
|
||||
showFooterDate: settings.news_card_show_footer_date ?? true,
|
||||
showFooterButton: settings.news_card_show_footer_button ?? true,
|
||||
footerText: settings.news_card_footer_text || ""
|
||||
};
|
||||
|
||||
@ -148,6 +149,7 @@ export default async function Home() {
|
||||
imagenUrl={imagenUrl}
|
||||
showCategory={cardSettings.showCategory}
|
||||
showFooterDate={cardSettings.showFooterDate}
|
||||
showFooterButton={cardSettings.showFooterButton}
|
||||
footerText={cardSettings.footerText}
|
||||
/>
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user