table alignment, currentParameter condition

master
g 3 years ago
parent 5653893945
commit 752c7249af

@ -196,12 +196,12 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<p className="text-sm font-medium">{currentParameter.label} в {currentYear.label} году</p>
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<tbody>
{info.power_fact_mw != null &&
{info[currentParameter.value] != null &&
<tr className="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
{currentTech.label}
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info[currentParameter.value].toFixed(1).replace(".", ",")}
</td>
</tr>
@ -221,7 +221,7 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Солнечные электростанции
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_solar_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -231,7 +231,7 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Наземные ветроэлектростанции
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_onshore_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -241,7 +241,7 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Офшорные ветроэлектростанции
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_offshore_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -251,7 +251,7 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-medium text-gray-900 dark:text-white uppercase">
Всего ВИЭ <span className="font-normal normal-case">(включая СЭС, ВЭС, ГЭС, БиоЭС, ГеоЭС)</span>
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_res_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -261,7 +261,7 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Доля всей ВИЭ-генерации в балансе мощности страны, %
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_res_share_power.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -271,7 +271,7 @@ export default function Countries({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Доля СЭС и ВЭС в балансе мощности страны, %
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_solar_wind_share_power.toFixed(1).replace(".", ",")}
</td>
</tr>

@ -243,12 +243,12 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<p className="text-sm font-medium">{currentParameter.label} в {currentYear.label} году</p>
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<tbody>
{info.power_fact_mw != null &&
{info[currentParameter.value] != null &&
<tr className="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
{currentTech.label}, {currentSupport.label}
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info[currentParameter.value].toFixed(1).replace(".", ",")}
</td>
</tr>
@ -267,7 +267,7 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Солнечные электростанции
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_solar_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -277,7 +277,7 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Ветроэлектростанции
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_wind_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -287,7 +287,7 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 dark:text-white">
Малые гидроэлектростанции
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_shydro_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -297,7 +297,7 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 whitespace-nowrap dark:text-white">
Другие объекты ВИЭ-генерации
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_other_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -307,7 +307,7 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white uppercase">
Всего ВИЭ
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_power_fact_res_mw.toFixed(1).replace(".", ",")}
</td>
</tr>
@ -317,7 +317,7 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<th scope="row" className="px-2 py-4 font-normal text-gray-900 whitespace-nowrap dark:text-white">
Доля всех ВИЭ в балансе мощности региона, %
</th>
<td className="px-2 py-4">
<td className="px-2 py-4 text-right">
{info.static_res_share_power.toFixed(1).replace(".", ",")}
</td>
</tr>

Loading…
Cancel
Save