Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/multi-domain-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- This makes use of the `NODE_CONFIG_ENV` env variable to determine which `local.json` files to load
- Loads `default.json` => `local.json` => `local-{NODE_CONFIG_ENV}`.json
- You set all of your base defaults in `local.json` still, then set things that are unique to those domains, such `geoJsonFilename` or authentication strategies in each of the domain specifics jsons
- You set all of your base defaults in `local.json` still, then set things that are unique to those domains, such as `geoJsonFileName` or authentication strategies in each of the domain specifics jsons
- The `NODE_CONFIG_ENV` var names should not contain `/` or `.`

## File System
Expand All @@ -20,7 +20,7 @@ local - orangemap.json

- `local.json` is the base config file that all other configs will inherit from, it can also be its own map instance if do not set the `NODE_CONFIG_ENV` env variable
- The other files will inherit everything you set in `local.json` and then override any values that are set in the domain specific file
- Such as in `local-applemap.json`, we have set a new title, a separate Discord strategy, and a different geoJsonFilename
- Such as in `local-applemap.json`, we have set a new title, a separate Discord strategy, and a different geoJsonFileName
- Only config setting you must set in each file is the port, since separate instances of the app will be generated
- In `local-orangemap.json`, we also set a different start Latitude and Longitude and have disabled some various features that we do not want on that map. In `local.json`, we had set `alwaysEnabledPerms = ["map"]`, however, for orangemap we have overridden that by providing an empty array.
- The databases specified in `local.json` will be used in all 3 maps, as will all of the permissions.
Expand Down
2 changes: 1 addition & 1 deletion config/multi-domain-example/local-applemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"general": {
"title": "Apple Map",
"headerTitle": "Apple Map PoGo",
"geoJsonFilName": "http://koji.map.com/api/v1/geofence/feature-collection/apple"
"geoJsonFileName": "http://koji.map.com/api/v1/geofence/feature-collection/apple"
},
"links": {
"discordInvite": "apple map invite",
Expand Down
2 changes: 1 addition & 1 deletion config/multi-domain-example/local-orangemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"headerTitle": "Orange Map",
"startLat": 67.2512,
"startLon": -25.9667,
"geoJsonFilName": "http://koji.map.com/api/v1/geofence/feature-collection/orange"
"geoJsonFileName": "http://koji.map.com/api/v1/geofence/feature-collection/orange"
},
"misc": {
"enableMapJsFilter": false,
Expand Down
7 changes: 4 additions & 3 deletions src/features/scanArea/ScanAreaTile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { getProperName } from '@utils/strings'
* @returns
*/
function ScanArea(featureCollection) {
const search = useStorage((s) => s.filters.scanAreas?.filter?.search)
const rawSearch = useStorage((s) => s.filters.scanAreas?.filter?.search ?? '')
const search = rawSearch.toLowerCase()
const tapToToggle = useStorage((s) => s.userSettings.scanAreas.tapToToggle)
const alwaysShowLabels = useStorage(
(s) => s.userSettings.scanAreas.alwaysShowLabels,
Expand All @@ -23,12 +24,12 @@ function ScanArea(featureCollection) {

return (
<GeoJSON
key={`${search}${tapToToggle}${alwaysShowLabels}`}
key={`${rawSearch}${tapToToggle}${alwaysShowLabels}`}
data={featureCollection}
filter={(f) =>
webhook ||
search === '' ||
f.properties.key.toLowerCase().includes(search.toLowerCase())
(f.properties?.key || '').toLowerCase().includes(search)
}
Comment thread
Mygod marked this conversation as resolved.
eventHandlers={{
click: ({ propagatedFrom: layer }) => {
Expand Down
Loading