From 5f87a9f2e30440ddc4b471624915c9966122643f Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Wed, 29 Jul 2026 16:44:16 +0700 Subject: [PATCH] feat: centralize brand information in package data and integrate dynamically into contact and footer sections --- apps/product-site/messages/en.json | 1 - apps/product-site/messages/id.json | 1 - .../src/components/sections/Contact.tsx | 12 +++++++----- .../src/components/sections/Footer.tsx | 16 +++++++++------- packages/brand/src/data/info.json | 16 ++++++++++------ packages/brand/src/index.ts | 1 + 6 files changed, 27 insertions(+), 20 deletions(-) diff --git a/apps/product-site/messages/en.json b/apps/product-site/messages/en.json index fe565c3..df198df 100644 --- a/apps/product-site/messages/en.json +++ b/apps/product-site/messages/en.json @@ -196,7 +196,6 @@ "email": "Email", "phone": "Phone / WhatsApp", "office": "Office", - "address": "Jl. Soekarno-Hatta No.409, Karasak, Kec. Astanaanyar, Bandung City, West Java 40243", "form": { "title": "Send a message to our team", "name": "Full name", diff --git a/apps/product-site/messages/id.json b/apps/product-site/messages/id.json index 02d34d3..7333fba 100644 --- a/apps/product-site/messages/id.json +++ b/apps/product-site/messages/id.json @@ -196,7 +196,6 @@ "email": "Email", "phone": "Telepon / WhatsApp", "office": "Kantor", - "address": "Jl. Soekarno-Hatta No.409, Karasak, Kec. Astanaanyar, Kota Bandung, Jawa Barat 40243", "form": { "title": "Kirim pesan ke tim kami", "name": "Nama lengkap", diff --git a/apps/product-site/src/components/sections/Contact.tsx b/apps/product-site/src/components/sections/Contact.tsx index 36ea2de..f4a78d5 100644 --- a/apps/product-site/src/components/sections/Contact.tsx +++ b/apps/product-site/src/components/sections/Contact.tsx @@ -1,25 +1,27 @@ 'use client'; -import { useTranslations } from 'next-intl'; +import { useTranslations, useLocale } from 'next-intl'; +import { brandInfo } from '@repo/brand'; export function Contact() { const t = useTranslations(); + const locale = useLocale() as 'id' | 'en'; const contactList = [ { icon: 'uil-envelope-alt', titleKey: 'Contact.email', - value: 'hello@pintumasuk.id', + value: brandInfo.email, }, { icon: 'uil-phone', titleKey: 'Contact.phone', - value: '+62 812-3456-7890', + value: brandInfo.phone, }, { icon: 'uil-map-marker', titleKey: 'Contact.office', - valueKey: 'Contact.address', + value: brandInfo.address[locale] || brandInfo.address.id, }, ]; @@ -43,7 +45,7 @@ export function Contact() {
{t('Footer.desc')}
-{t('Contact.address')}
+{brandInfo.address[locale] || brandInfo.address.id}