Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Hexagon/spotweb into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Aug 29, 2023
2 parents e53c848 + e4e2083 commit a56759a
Show file tree
Hide file tree
Showing 26 changed files with 280 additions and 223 deletions.
1 change: 1 addition & 0 deletions backend/scheduler/jobs/daily.priceupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const DailyPriceUpdate = async () => {
try {
const result = await EntsoeSpotprice(area.id, currentPeriod, endOfPeriod),
preparedQuery = database.prepare("INSERT INTO spotprice (country, area, spotprice, period, interval) VALUES (?,?,?,?,?)");
// deno-lint-ignore no-explicit-any
const runTransaction = database.transaction((data: any[]) => {
for (const item of data) {
preparedQuery.run(...item);
Expand Down
1 change: 1 addition & 0 deletions backend/scheduler/jobs/hourly.consumptionupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const UpdateLoadForArea = async (area: string) => {
try {
const result = await EntsoeLoad(area, dateYesterday, dateToday),
preparedQuery = database.prepare("INSERT INTO load (area, value, period, interval) VALUES (?,?,?,?)");
// deno-lint-ignore no-explicit-any
const runTransaction = database.transaction((data: any[]) => {
for (const item of data) {
preparedQuery.run(...item);
Expand Down
20 changes: 12 additions & 8 deletions components/ads/DisplayAd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ export default function DisplayAd(props: DisplayAdProps) {
adsbygoogle.push({});
});

return props.adsense && (
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9224018205432249"
data-ad-slot="7417217449"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
);
if (props.adsense) {
return (
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9224018205432249"
data-ad-slot="7417217449"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
)
}

return null
}
16 changes: 10 additions & 6 deletions components/ads/FixedAd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ export default function FixedAd(props: FixedAdProps) {
adsbygoogle.push({});
});

return props.adsense && (
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-9224018205432249"
data-ad-slot="8951211842"></ins>
);
if (props.adsense) {
return (
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-9224018205432249"
data-ad-slot="8951211842"></ins>
)
}

return null
}
26 changes: 15 additions & 11 deletions components/ads/MultiPlexAd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ export default function MultiPlexAd(props: MultiPlexAdProps) {
adsbygoogle.push({});
});

return props.adsense && (
<div class={`col-lg-${props.cols} m-0 p-0`}>
<div class="mw-full m-0 p-0 mr-20 mt-20">
<div class="card p-0 m-0 text-center">
<ins class="adsbygoogle"
style="display:block"
data-ad-format="autorelaxed"
data-ad-client="ca-pub-9224018205432249"
data-ad-slot="9853677086"></ins>
if (props.adsense) {
return (
<div class={`col-lg-${props.cols} m-0 p-0`}>
<div class="mw-full m-0 p-0 mr-20 mt-20">
<div class="card p-0 m-0 text-center">
<ins class="adsbygoogle"
style="display:block"
data-ad-format="autorelaxed"
data-ad-client="ca-pub-9224018205432249"
data-ad-slot="9853677086"></ins>
</div>
</div>
</div>
</div>
);
);
}

return null;
}
2 changes: 1 addition & 1 deletion components/charts/SingleAreaChartLongTerm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function SingleAreaLongTermChart(props: SingleAreaLongTermChartPr
<>
<p>
<span data-t-key={"common.longtermchart.priceFactorDescriptionPart1"} lang={props.lang}>Elpriset som visas i tabellen baseras på följande formel: (([spotpris]*</span>
<span>{props.multiplicator}</span>
<span>{props.multiplier}</span>
<span>) +</span>
<span data-t-key={"common.longtermchart.priceFactorDescriptionPart2"} lang={props.lang}>(avgifter)) *</span>
<span>{props.factor}</span>
Expand Down
2 changes: 2 additions & 0 deletions components/layout/SwHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface HeadProps extends PageProps {
country?: Country;
area?: DataArea;
adsense?: string;
children?: never[];
}

export default function SwHead(props: HeadProps) {
Expand Down Expand Up @@ -129,6 +130,7 @@ export default function SwHead(props: HeadProps) {
{ jsonLdPriceFlag && (
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: jsonLdPriceDocument }}></script>
)}

</Head>
);
}
2 changes: 1 addition & 1 deletion config/translations/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const de = {
"fees": "Gebühren",
"factor": "Faktor",
"decimals": "Dezimalstellen",
"multiplier": "Multiplikator"
"multiplier": "Multiplikator",
},
"countries": {
"sv": "Schweden",
Expand Down
2 changes: 1 addition & 1 deletion config/translations/dk.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const dk = {
"fees": "Afgifter",
"factor": "Faktor",
"decimals": "Decimaler",
"multiplier": "Multiplikator"
"multiplier": "Multiplikator",
},
"countries": {
"sv": "Sverige",
Expand Down
2 changes: 1 addition & 1 deletion config/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const en = {
"fees": "Fees",
"factor": "Factor",
"decimals": "Decimals",
"multiplier": "Multiplier"
"multiplier": "Multiplier",
},
"countries": {
"sv": "Sweden",
Expand Down
2 changes: 1 addition & 1 deletion config/translations/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const es = {
"fees": "Tarifas",
"factor": "Factor",
"decimals": "decimales",
"multiplier": "Multiplicador"
"multiplier": "Multiplicador",
},
"countries": {
"sv": "Suecia",
Expand Down
2 changes: 1 addition & 1 deletion config/translations/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const fi = {
"fees": "Maksut",
"factor": "Tekijä",
"decimals": "Desimaalit",
"multiplier": "Kerroin"
"multiplier": "Kerroin",
},
"countries": {
"sv": "Ruotsi",
Expand Down
2 changes: 1 addition & 1 deletion config/translations/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const fr = {
"fees": "Frais",
"factor": "Facteur",
"decimals": "Décimales",
"multiplier": "Multiplikator"
"multiplier": "Multiplikator",
},
"countries": {
"sv": "Suède",
Expand Down
2 changes: 1 addition & 1 deletion config/translations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export { de } from "./de.js";
export { en } from "./en.js";
export { fr } from "./fr.js";
export { es } from "./es.js";
export { nl } from "./nl.js";
export { nl } from "./nl.js";
Loading

0 comments on commit a56759a

Please sign in to comment.