menu deish next line updated

This commit is contained in:
akash 2026-01-20 18:42:02 +05:30
parent 6358c15b55
commit 08c3ebb39d
5 changed files with 51 additions and 8 deletions

View File

@ -71,6 +71,25 @@ export default function MenuPage() {
}
};
const renderDishName = (name: string) => {
// Find all parenthetical expressions
const parts = name.split(/(\(.*?\))/g);
return parts.map((part, index) => {
if (part.startsWith('(') && part.endsWith(')')) {
return (
<span key={index} style={{ whiteSpace: 'nowrap', display: 'inline-block' }}>
{part}
</span>
);
}
// If the next part is a bracket, ensure there is exactly one space before it
if (index < parts.length - 1 && parts[index + 1].startsWith('(')) {
return part.trimEnd() + " ";
}
return part;
});
};
return (
<main className={styles.main}>
@ -174,7 +193,9 @@ export default function MenuPage() {
<div className={styles.cardContent}>
<div className={styles.cardHeader}>
<h3 className={styles.dishName}>{item.name}</h3>
<h3 className={styles.dishName}>
{renderDishName(item.name)}
</h3>
</div>
<p className={styles.description}>{item.description}</p>
</div>

View File

@ -337,7 +337,7 @@ export default function ContactContent() {
</p>
<a href="tel:5195816363" className={styles.locationSubtitle}>
519-581-6363
Call Us: 519-581-6363
</a>
</div>
</div>
@ -363,7 +363,7 @@ export default function ContactContent() {
</p>
<a href="tel:2893139838" className={styles.locationSubtitle}>
289-313-9838
Call Us: 289-313-9838
</a>
</div>
</div>

View File

@ -215,7 +215,7 @@ export default function Catering() {
<div className={styles.featureIcon}><FamilyIcon /></div>
</div>
<div className={styles.featureContent}>
<h4>Family gatherings</h4>
<h4>Family Gatherings</h4>
</div>
</motion.div>
<motion.div variants={itemVariants} className={styles.featureItem}>
@ -231,7 +231,7 @@ export default function Catering() {
<div className={styles.featureIcon}><BabyIcon /></div>
</div>
<div className={styles.featureContent}>
<h4>Baby shower</h4>
<h4>Baby Shower</h4>
</div>
</motion.div>
<motion.div variants={itemVariants} className={styles.featureItem}>

View File

@ -155,8 +155,8 @@
}
.iconImage {
width: 22px;
height: 22px;
width: 20px;
height: 20px;
margin-right: 10px;
object-fit: contain;
display: inline-block;

View File

@ -32,6 +32,26 @@ export default function HomeMenu() {
}
};
const renderDishName = (name: string) => {
// Find all parenthetical expressions
const parts = name.split(/(\(.*?\))/g);
return parts.map((part, index) => {
if (part.startsWith('(') && part.endsWith(')')) {
return (
<span key={index} style={{ whiteSpace: 'nowrap', display: 'inline-block' }}>
{part}
</span>
);
}
// If the next part is a bracket, ensure there is exactly one space before it
if (index < parts.length - 1 && parts[index + 1].startsWith('(')) {
return part.trimEnd() + " ";
}
return part;
});
};
return (
<section className={styles.menuSection}>
@ -82,7 +102,9 @@ export default function HomeMenu() {
<div className={styles.cardContent}>
<div className={styles.cardHeader}>
<h3 className={styles.dishName}>{item.name}</h3>
<h3 className={styles.dishName}>
{renderDishName(item.name)}
</h3>
</div>
<p className={styles.description}>{item.description}</p>
</div>