Created
April 16, 2025 21:09
-
-
Save viniciusmelocodes/07afb17ad1a0812fa5babfc2f3284ff0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Metadata } from 'next' | |
import './globals.css' | |
import './embla.css' | |
import './embla_base.css' | |
import { Providers } from './providers' | |
import { MetaPixel } from '@/components/app/ui/MetaPixel' | |
import { HomologAlert } from '@/components/app/ui/HomologAlert' | |
// import { ChatwootWidget } from '@/components/ChatwootWidget' | |
import { CookiesNotifier } from '@/components/site/common/CookiesNotifier' | |
import UnderMaintenance from '@/components/site/common/UnderMaintenance' | |
import { checkServer } from '@/utils/requests/siteRequests' | |
import { Manrope } from 'next/font/google' | |
import { ClientHeader } from './clientHeader' | |
export const dynamic = 'force-dynamic' | |
export const revalidate = 0 | |
const manrope = Manrope({ subsets: ['latin'] }) | |
export const metadata: Metadata = { | |
title: { | |
default: 'Chãozão', | |
// template: '%s - Chãozão', | |
template: '%s', | |
}, | |
description: 'Chãozão - O Maior Portal de Imóveis Rurais do Brasil', | |
} | |
const jsonLd = { | |
"@context": "https://schema.org", | |
"@type": "LocalBusiness", | |
"name": "Chãozão", | |
"image": "https://www.chaozao.com.br/images/logo/logo-name.svg", | |
"@id": "https://www.chaozao.com.br", | |
"url": "https://www.chaozao.com.br", | |
"telephone": "62 3030 1821", | |
"address": { | |
"@type": "PostalAddress", | |
"streetAddress": "Avenida Deputado Jamel Cecílio, 2690 - Ed. Metropolitan Tokyo, Sala 1505 - Jardim Goiás, Goiânia", | |
"addressLocality": "Goiânia", | |
"postalCode": "74810-100", | |
"addressCountry": "BR" | |
}, | |
"openingHoursSpecification": { | |
"@type": "OpeningHoursSpecification", | |
"dayOfWeek": [ | |
"Monday", | |
"Tuesday", | |
"Wednesday", | |
"Thursday", | |
"Friday" | |
], | |
"opens": "09:00", | |
"closes": "18:00" | |
} | |
} | |
export default async function RootLayout({ | |
children, | |
}: { | |
children: React.ReactNode | |
}) { | |
const serverOnline = await checkServer() | |
return ( | |
<html lang="pt-BR"> | |
<head> | |
<meta charSet="UTF-8" /> | |
</head> | |
<script | |
type="text/javascript" | |
async | |
src="https://d335luupugsy2.cloudfront.net/js/loader-scripts/9dae260c-bacb-4c43-8479-5281431a4c55-loader.js" | |
></script> | |
<script type="application/ld+json" id="marcacaoSeo" dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}></script> | |
<body className={manrope.className}> | |
<noscript> | |
<iframe | |
src="https://www.googletagmanager.com/ns.html?id=GTM-KHGJQHBP" | |
height="0" | |
width="0" | |
style={{ display: 'none', visibility: 'hidden' }} | |
></iframe> | |
</noscript> | |
<ClientHeader /> | |
{serverOnline ? ( | |
<Providers> | |
<HomologAlert /> | |
{children} | |
<CookiesNotifier /> | |
{/* <MetaPixel /> */} | |
{/* <Suspense> | |
<ChatwootWidget /> | |
</Suspense> */} | |
</Providers> | |
) : ( | |
<UnderMaintenance /> | |
)} | |
</body> | |
{/* Scripts comentados de exemplo */} | |
{/* <Script async src="https://www.googletagmanager.com/gtag/js?id=AW-16569416209" /> | |
<Script> | |
{` | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'AW-16569416209'); | |
`} | |
</Script> | |
<Script> | |
{` | |
gtag('event', 'page_view', { | |
'send_to': 'AW-16569416209', | |
'value': 'replace with value', | |
'items': [{ | |
'id': 'replace with value', | |
'location_id': 'replace with value', | |
'google_business_vertical': 'custom' | |
}] | |
}); | |
`} | |
</Script> */} | |
</html> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment