Add persistent flag of origin
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 1m12s
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 1m12s
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { hasFlag } from 'country-flag-icons'
|
||||
import { hydrateRoot, createRoot } from 'react-dom/client'
|
||||
|
||||
import App from 'src/App'
|
||||
@ -15,6 +16,11 @@ if (!redwoodAppElement)
|
||||
"exists in your 'web/src/index.html' file."
|
||||
)
|
||||
|
||||
if (!hasFlag(process.env.COUNTRY))
|
||||
throw new Error(
|
||||
'Invalid COUNTRY environment variable, please select a valid ISO-3166-1 alpha-2 country code\n See https://en.wikipedia.org/wiki/ISO_3166-1#Codes'
|
||||
)
|
||||
|
||||
if (redwoodAppElement.children?.length > 0)
|
||||
hydrateRoot(redwoodAppElement, <App />)
|
||||
else {
|
||||
|
Reference in New Issue
Block a user