const db = require('./config/database');
async function updateContactLayout() {
try {
const contactContentHTML = `
Our Contact Information
Reach out to us through any of these channels
Location
Visit our shop
123 Creative Street
Art District, CA 90210
Business Hours
Monday - Friday
9:00 AM - 6:00 PM
Saturday
10:00 AM - 4:00 PM
`;
const contactDelta = {
ops: [
{ insert: 'Get In Touch', attributes: { header: 2 } },
{ insert: '\nHave questions or feedback? We\'d love to hear from you. Send us a message and we\'ll respond as soon as possible.\n\n' },
{ insert: 'Contact Information', attributes: { header: 2 } },
{ insert: '\n' },
{ insert: 'Phone', attributes: { header: 3 } },
{ insert: '\nGive us a call: ' },
{ insert: '+1 (234) 567-8900', attributes: { bold: true, link: 'tel:+1234567890' } },
{ insert: '\n\n' },
{ insert: 'Email', attributes: { header: 3 } },
{ insert: '\nSend us an email: ' },
{ insert: 'support@skyartshop.com', attributes: { bold: true, link: 'mailto:support@skyartshop.com' } },
{ insert: '\n\n' },
{ insert: 'Location', attributes: { header: 3 } },
{ insert: '\n' },
{ insert: '123 Creative Street\nArt District, CA 90210', attributes: { bold: true } },
{ insert: '\n\n' },
{ insert: 'Business Hours', attributes: { header: 2 } },
{ insert: '\n' },
{ insert: 'Monday - Friday: 9:00 AM - 6:00 PM', attributes: { list: 'bullet' } },
{ insert: '\n' },
{ insert: 'Saturday: 10:00 AM - 4:00 PM', attributes: { list: 'bullet' } },
{ insert: '\n' },
{ insert: 'Sunday: Closed', attributes: { list: 'bullet' } },
{ insert: '\n\nFill out the contact form on our website and we\'ll get back to you within 24 hours\n' }
]
};
await db.query(
`UPDATE pages SET
content = $1,
pagecontent = $2,
updatedat = NOW()
WHERE slug = 'contact'`,
[JSON.stringify(contactDelta), contactContentHTML]
);
console.log('✅ Contact page layout updated successfully!');
process.exit(0);
} catch (error) {
console.error('❌ Error:', error);
process.exit(1);
}
}
updateContactLayout();