address: fix translations
This commit is contained in:
@@ -35,27 +35,27 @@ export default function AddressPage() {
|
|||||||
>
|
>
|
||||||
<AddressSummary />
|
<AddressSummary />
|
||||||
|
|
||||||
<Card style={{ marginTop: 16 }} title={t("addressDetails")}>
|
<Card style={{ marginTop: 16 }} title={t("address.addressDetails")}>
|
||||||
<div className={styles.services}>
|
<div className={styles.services}>
|
||||||
<Button className={styles.serviceButton} icon={<ApartmentIcon />}>
|
<Button className={styles.serviceButton} icon={<ApartmentIcon />}>
|
||||||
<ProText
|
<ProText
|
||||||
style={{ fontWeight: "bold", color: "rgba(95, 108, 123, 1)" }}
|
style={{ fontWeight: "bold", color: "rgba(95, 108, 123, 1)" }}
|
||||||
>
|
>
|
||||||
{t("apartment")}
|
{t("address.apartment")}
|
||||||
</ProText>
|
</ProText>
|
||||||
</Button>
|
</Button>
|
||||||
<Button className={styles.serviceButton} icon={<HouseIcon />}>
|
<Button className={styles.serviceButton} icon={<HouseIcon />}>
|
||||||
<ProText
|
<ProText
|
||||||
style={{ fontWeight: "bold", color: "rgba(95, 108, 123, 1)" }}
|
style={{ fontWeight: "bold", color: "rgba(95, 108, 123, 1)" }}
|
||||||
>
|
>
|
||||||
{t("house")}
|
{t("address.house")}
|
||||||
</ProText>
|
</ProText>
|
||||||
</Button>
|
</Button>
|
||||||
<Button className={styles.serviceButton} icon={<OfficeIcon />}>
|
<Button className={styles.serviceButton} icon={<OfficeIcon />}>
|
||||||
<ProText
|
<ProText
|
||||||
style={{ fontWeight: "bold", color: "rgba(95, 108, 123, 1)" }}
|
style={{ fontWeight: "bold", color: "rgba(95, 108, 123, 1)" }}
|
||||||
>
|
>
|
||||||
{t("office")}
|
{t("address.office")}
|
||||||
</ProText>
|
</ProText>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,7 +75,7 @@ export default function AddressPage() {
|
|||||||
rules={[{ required: true, message: "" }]}
|
rules={[{ required: true, message: "" }]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("floor")}
|
placeholder={t("address.floor")}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}}
|
}}
|
||||||
@@ -83,12 +83,12 @@ export default function AddressPage() {
|
|||||||
/>
|
/>
|
||||||
</Form.Item>{" "}
|
</Form.Item>{" "}
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("aptNumber")}
|
label={t("address.aptNumber")}
|
||||||
name="apt"
|
name="apt"
|
||||||
rules={[{ required: true, message: "" }]}
|
rules={[{ required: true, message: "" }]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("aptNumber")}
|
placeholder={t("address.aptNumber")}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}}
|
}}
|
||||||
@@ -97,12 +97,12 @@ export default function AddressPage() {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("street")}
|
label={t("address.street")}
|
||||||
name="street"
|
name="street"
|
||||||
rules={[{ required: true, message: "" }]}
|
rules={[{ required: true, message: "" }]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("street")}
|
placeholder={t("address.street")}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}}
|
}}
|
||||||
@@ -110,12 +110,12 @@ export default function AddressPage() {
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("additionalDirection")}
|
label={t("address.additionalDirection")}
|
||||||
name="additional"
|
name="additional"
|
||||||
rules={[{ required: true, message: "" }]}
|
rules={[{ required: true, message: "" }]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("additionalDirection")}
|
placeholder={t("address.additionalDirection")}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}}
|
}}
|
||||||
@@ -124,12 +124,12 @@ export default function AddressPage() {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("mobileNumber")}
|
label={t("address.mobileNumber")}
|
||||||
name="phone"
|
name="phone"
|
||||||
rules={[{ required: true, message: "" }]}
|
rules={[{ required: true, message: "" }]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("mobileNumber")}
|
placeholder={t("address.mobileNumber")}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}}
|
}}
|
||||||
@@ -138,12 +138,12 @@ export default function AddressPage() {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("addressLabel")}
|
label={t("address.addressLabel")}
|
||||||
name="addressLabel"
|
name="addressLabel"
|
||||||
rules={[{ required: true, message: "" }]}
|
rules={[{ required: true, message: "" }]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("addressLabel")}
|
placeholder={t("address.addressLabel")}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}}
|
}}
|
||||||
@@ -187,7 +187,7 @@ export default function AddressPage() {
|
|||||||
}}
|
}}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
>
|
>
|
||||||
{t("saveAddress")}
|
{t("address.saveAddress")}
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const AddressSummary = () => {
|
|||||||
console.error("Failed to parse location data:", error);
|
console.error("Failed to parse location data:", error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[dispatch]
|
[dispatch],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleMapBottomSheetOpen = useCallback(() => {
|
const handleMapBottomSheetOpen = useCallback(() => {
|
||||||
@@ -44,7 +44,7 @@ export const AddressSummary = () => {
|
|||||||
|
|
||||||
const initialValue = useMemo(
|
const initialValue = useMemo(
|
||||||
() => (location ? JSON.stringify(location) : ""),
|
() => (location ? JSON.stringify(location) : ""),
|
||||||
[location]
|
[location],
|
||||||
);
|
);
|
||||||
|
|
||||||
const shouldRender = useMemo(() => orderType === "delivery", [orderType]);
|
const shouldRender = useMemo(() => orderType === "delivery", [orderType]);
|
||||||
@@ -56,24 +56,28 @@ export const AddressSummary = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Card
|
<Card
|
||||||
title={t("locationDetails")}
|
title={t("address.locationDetails")}
|
||||||
extra={
|
extra={
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={handleMapBottomSheetOpen}
|
onClick={handleMapBottomSheetOpen}
|
||||||
>
|
>
|
||||||
{location ? t("changeLocation") : t("selectLocation")}
|
{location
|
||||||
|
? t("address.changeLocation")
|
||||||
|
: t("address.selectLocation")}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
className={styles.addressCard}
|
className={styles.addressCard}
|
||||||
>
|
>
|
||||||
{!location ? (
|
{!location ? (
|
||||||
<div className={styles.noLocationContainer}>
|
<div className={styles.noLocationContainer}>
|
||||||
<ProText type="secondary">{t("noLocationSelected")}</ProText>
|
<ProText type="secondary">
|
||||||
|
{t("address.noLocationSelected")}
|
||||||
|
</ProText>
|
||||||
<br />
|
<br />
|
||||||
<ProText type="secondary" className={styles.smallTextStyle}>
|
<ProText type="secondary" className={styles.smallTextStyle}>
|
||||||
{t("clickEditToSelect")}
|
{t("address.clickEditToSelect")}
|
||||||
</ProText>
|
</ProText>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user