-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/build-arm-image
- Loading branch information
Showing
94 changed files
with
1,192 additions
and
1,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import { spawn } from "child_process"; | |
import { loadEnvConfig } from "@next/env"; | ||
import express from "express"; | ||
import next from "next"; | ||
import nodemailerSendgrid from "nodemailer-sendgrid"; | ||
import payload from "payload"; | ||
import { Payload } from "payload/dist/payload"; | ||
|
||
|
@@ -20,8 +19,17 @@ const dev = process.env.NODE_ENV !== "production"; | |
// https://github.com/vercel/next.js/discussions/33835#discussioncomment-2559392 | ||
const hostname = process.env.NEXT_HOSTNAME || "localhost"; | ||
const port = Number.parseInt(process.env.PORT || "3000", 10); | ||
const sendGridAPIKey = process.env.SENDGRID_API_KEY; | ||
|
||
const smtpAuthPass = process.env.SMTP_PASS || process.env.SENDGRID_API_KEY; | ||
const smtpFromName = | ||
process.env.SMTP_FROM_NAME || | ||
process.env.SENDGRID_FROM_NAME || | ||
"Charter Africa CMS"; | ||
const smtpFromAddress = | ||
process.env.SMTP_FROM_ADDRESS || | ||
process.env.SENDGRID_FROM_EMAIL || | ||
"[email protected]"; | ||
const smtpPort = Number(process.env.SMTP_PORT || 587); | ||
// Make sure commands gracefully respect termination signals (e.g. from Docker) | ||
// Allow the graceful termination to be manually configurable | ||
if (!process.env.NEXT_MANUAL_SIG_HANDLE) { | ||
|
@@ -35,15 +43,20 @@ const start = async (): Promise<void> => { | |
let localPayload: Payload; | ||
try { | ||
localPayload = await payload.init({ | ||
...(sendGridAPIKey | ||
...(smtpAuthPass | ||
? { | ||
email: { | ||
transportOptions: nodemailerSendgrid({ | ||
apiKey: sendGridAPIKey, | ||
}), | ||
fromName: process.env.SENDGRID_FROM_NAME || "Admin", | ||
fromAddress: | ||
process.env.SENDGRID_FROM_EMAIL || "[email protected]", | ||
transportOptions: { | ||
auth: { | ||
user: process.env.SMTP_USER || "apikey", | ||
pass: smtpAuthPass, | ||
}, | ||
host: process.env.SMTP_HOST || "smtp.sendgrid.net", | ||
port: smtpPort, | ||
secure: smtpPort === 465, // true for port 465, false (the default) for 587 and others | ||
}, | ||
fromName: smtpFromName, | ||
fromAddress: smtpFromAddress, | ||
}, | ||
} | ||
: undefined), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,8 +67,4 @@ NavBar.propTypes = { | |
), | ||
}; | ||
|
||
NavBar.defaultProps = { | ||
menus: undefined, | ||
}; | ||
|
||
export default NavBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { getPost } from "@/civicsignalblog/lib/data/utils/posts"; | ||
|
||
async function post(api, context) { | ||
const { params } = context; | ||
const { params, draftMode = false } = context; | ||
const options = { draft: draftMode }; | ||
const page = params.slugs[1]; | ||
const slug = params.slugs[2]; | ||
return getPost(api, slug, page); | ||
return getPost(api, slug, page, options); | ||
} | ||
|
||
export default post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+9.84 KB
(1100%)
apps/climatemappedafrica/public/apple-touch-icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
16 changes: 9 additions & 7 deletions
16
apps/climatemappedafrica/public/site.webmanifest
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
{ | ||
"name": "", | ||
"short_name": "", | ||
"name": "ClimateMap Africa", | ||
"short_name": "CM A", | ||
"icons": [ | ||
{ | ||
"src": "/android-chrome-192x192.png", | ||
"src": "/web-app-manifest-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
"type": "image/png", | ||
"purpose": "maskable" | ||
}, | ||
{ | ||
"src": "/android-chrome-512x512.png", | ||
"src": "/web-app-manifest-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
"type": "image/png", | ||
"purpose": "maskable" | ||
} | ||
], | ||
"theme_color": "#ffffff", | ||
"theme_color": "#0B2AEA", | ||
"background_color": "#ffffff", | ||
"display": "standalone" | ||
} |
Oops, something went wrong.