decentraland-ui
Version:
Decentraland's UI components and styles
48 lines (47 loc) • 2.7 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var NotificationItem_1 = __importDefault(require("../../NotificationItem"));
var LandRented_1 = __importDefault(require("../../../Icons/Notifications/LandRented"));
var IconBadge_1 = require("../../../IconBadge");
var i18N = {
en: {
description: function (coords, tenant, link) { return (react_1.default.createElement(react_1.default.Fragment, null,
"Your LAND at",
react_1.default.createElement(IconBadge_1.IconBadge, { icon: "places", text: coords, onClick: function () { return window.open(link, '_blank'); } }),
"was rented by ",
tenant)); },
title: 'LAND Rented'
},
es: {
description: function (coords, tenant, link) { return (react_1.default.createElement(react_1.default.Fragment, null,
"Tu LAND en",
react_1.default.createElement(IconBadge_1.IconBadge, { icon: "places", text: coords, onClick: function () { return window.open(link, '_blank'); } }),
"fue alquilada por ",
tenant)); },
title: 'LAND alquilada'
},
zh: {
description: function (coords, tenant, link) { return (react_1.default.createElement(react_1.default.Fragment, null,
"\u4F60\u7684\u571F\u5730",
react_1.default.createElement(IconBadge_1.IconBadge, { icon: "places", text: coords, onClick: function () { return window.open(link, '_blank'); } }),
"\u79DF\u4E86 ",
tenant)); },
title: '租用的土地'
}
};
/**
* @deprecated Should start using the same component migrated to UI2.
*/
function LandRentedNotificationCmp(_a) {
var notification = _a.notification, locale = _a.locale, renderProfile = _a.renderProfile;
return (react_1.default.createElement(NotificationItem_1.default, { image: { image: react_1.default.createElement(LandRented_1.default, { width: "48", height: "48" }) }, timestamp: notification.timestamp, isNew: !notification.read, locale: locale },
react_1.default.createElement("p", { className: "dcl notification-item__content-title" }, i18N[locale].title),
react_1.default.createElement("p", { className: "dcl notification-item__content-description" }, i18N[locale].description(notification.metadata.land, renderProfile
? renderProfile(notification.metadata.tenant)
: notification.metadata.tenant, notification.metadata.link))));
}
exports.default = LandRentedNotificationCmp;