Skip to content

Commit

Permalink
add pre-filter example
Browse files Browse the repository at this point in the history
  • Loading branch information
joshreisner committed Aug 25, 2024
1 parent 4f5f19c commit a836482
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ var tsml_react_config = {
};
```

### Override type defaults

If you wanted to add a list that is pre-filtered to a single type, "Women" in this example, you can add this code:

```js
var tsml_react_config = {
defaults: { type: ['women'] },
show: {
controls: false,
title: false,
},
};
```

### Use kilometers

Distances can be calculated in miles (`mi`) or kilometers (`km`).
Expand All @@ -64,6 +78,7 @@ var tsml_react_config = {
### Disable Add to Calendar button

You can disable the add to calendar button if needed.

```js
var tsml_react_config = {
calendar_enabled: false,
Expand Down
40 changes: 40 additions & 0 deletions public/tests/women.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="description" content="React JS recovery meeting finder demo" />
<link rel="icon" type="image/png" href="/logo.png" />
<title>Meetings</title>
<style type="text/css">
body {
margin: 0;
}
#tsml-ui {
min-height: 100vh;
min-height: -webkit-fill-available;
}
</style>
</head>
<body>
<div
id="tsml-ui"
data-src="https://sheets.code4recovery.org/storage/12Ga8uwMG4WJ8pZ_SEU7vNETp_aQZ-2yNVsYDFqIwHyE.json"
data-mapbox="pk.eyJ1Ijoiam9zaHJlaXNuZXIiLCJhIjoiY2tvYXA0YnZxMGRldDJxbzdta25uNGphdiJ9.eay-UKgIT99ALmdw08xBPw"
data-timezone="America/Los_Angeles"
></div>
<script>
var tsml_react_config = {
defaults: { type: ['women'] },
show: {
controls: false,
title: false,
},
};
</script>
<script src="/app.js" async></script>
</body>
</html>

0 comments on commit a836482

Please sign in to comment.