generated from nhcarrigan/template
feat: re-merge (#2)
Reviewed-on: https://codeberg.org/nhcarrigan/tingle-bot/pulls/2 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
@ -26,9 +26,17 @@ export const generateBanner = async(
|
||||
? "Blight Rain"
|
||||
: forecast.precipitation?.name;
|
||||
|
||||
const overlayPath = getOverlayImage(overlayQuery ?? null);
|
||||
if (overlayQuery === undefined) {
|
||||
return background;
|
||||
}
|
||||
|
||||
const overlay = await overlayImages(background.filePath, overlayPath ?? "");
|
||||
const overlayPath = getOverlayImage(overlayQuery);
|
||||
|
||||
if (overlayPath === null) {
|
||||
return background;
|
||||
}
|
||||
|
||||
const overlay = await overlayImages(background.filePath, overlayPath);
|
||||
|
||||
return overlay;
|
||||
};
|
||||
|
@ -15,7 +15,7 @@ import type { SpecialName }
|
||||
* @returns The file path to the overlay, or null if there is no overlay.
|
||||
*/
|
||||
export const getOverlayImage = (
|
||||
name: SpecialName | PrecipitationName | null,
|
||||
name: SpecialName | PrecipitationName,
|
||||
): string | null => {
|
||||
let fileName: string | null = null;
|
||||
switch (name) {
|
||||
|
Reference in New Issue
Block a user