Skip to content

Commit 3e03b8d

Browse files
committed
EU Support
1 parent 3be0ebd commit 3e03b8d

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ You can find examples for various backends, here: https://github.com/FastComment
6262

6363
`fastcomments-react-native` requires `react-native-webview`. As such, you should follow the installation steps for `react-native-webview`.
6464

65+
### Account Region (ATTENTION: EU Customers)
66+
67+
If your account is located in the EU, set `region = 'eu'` in the widget configuration.
68+
Otherwise, you do not have to define `region`.
69+
6570
## Contributing
6671

6772
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"eslint": "^7.2.0",
5858
"eslint-config-prettier": "^7.0.0",
5959
"eslint-plugin-prettier": "^3.1.3",
60-
"fastcomments-typescript": "^1.6.14",
60+
"fastcomments-typescript": "^1.6.21",
6161
"husky": "^6.0.0",
6262
"jest": "^26.0.1",
6363
"pod-install": "^0.1.0",

src/embed-core.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function FastCommentsEmbedCore(props: FastCommentsWidgetParameters, widge
139139
// @ts-ignore
140140
config.instanceId = Math.random() + '.' + Date.now();
141141
// @ts-ignore
142-
const host = config.apiHost ? config.apiHost : 'https://fastcomments.com';
142+
const host = config.apiHost ? config.apiHost : config.region === 'eu' ? 'https://eu.fastcomments.com' : 'https://fastcomments.com';
143143

144144
for (const key in config) {
145145
// @ts-ignore

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4184,10 +4184,10 @@
41844184
"resolved" "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz"
41854185
"version" "2.0.6"
41864186

4187-
"fastcomments-typescript@^1.6.14":
4188-
"integrity" "sha512-J74NcXi47AJMXR/ORnP8Bj/ui53KTcHS4zx/m3kM/0nrFiueza7vLG/y75NlLNmanHitlOkrdyvIo8mONhpj8w=="
4189-
"resolved" "https://registry.npmjs.org/fastcomments-typescript/-/fastcomments-typescript-1.6.14.tgz"
4190-
"version" "1.6.14"
4187+
"fastcomments-typescript@^1.6.21":
4188+
"integrity" "sha512-khay4/pFdLTlNOAufuMQKY3vhweAdq+Nv/OhfwUAim2Um2RjnrmaJVAlRSDD/YegR77/cVYRngbV+Hf65gTmig=="
4189+
"resolved" "https://registry.npmjs.org/fastcomments-typescript/-/fastcomments-typescript-1.6.21.tgz"
4190+
"version" "1.6.21"
41914191

41924192
"fastq@^1.6.0":
41934193
"integrity" "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw=="

0 commit comments

Comments
 (0)