Skip to content

Commit

Permalink
Merge pull request #19 from benjifs/fix/share-params
Browse files Browse the repository at this point in the history
Fix/share params
  • Loading branch information
benjifs authored Nov 25, 2023
2 parents 3f4db86 + d4a520b commit dd443c4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@
directory = "./src/functions"
node_bundler = "esbuild"

[[redirects]]
from = "/*"
to = "/.netlify/functions/:splat"
status = 200

[template.environment]
VITE_OMDB_API_KEY = "OMDB API Key (optional)"
OMDB_API_KEY = "OMDB API Key"
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sparkles",
"version": "0.6.1",
"version": "0.6.2",
"description": "micropub client",
"main": "./src/js/app.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/js/Editors/Tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const PostTypes = {
read: BookTile
}

const Tiles = (types, defaultTiles) => {
const Tiles = (types, defaultTiles, params) => {
if (!defaultTiles || !defaultTiles.length) {
defaultTiles = [ 'note', 'image', 'reply', 'bookmark', 'like', 'article', 'rsvp', 'watch', 'read' ]
}
Expand All @@ -109,7 +109,7 @@ const Tiles = (types, defaultTiles) => {
}
const tiles = types
.filter(pt => PostTypes[pt.type] && defaultTiles.includes(pt.type))
.map(pt => m(PostTypes[pt.type], { name: pt.name })) || []
.map(pt => m(PostTypes[pt.type], { name: pt.name, params })) || []

return {
view: () =>
Expand Down
2 changes: 1 addition & 1 deletion src/js/Pages/SharePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SharePage = () => {
m('b', 'url:'),
params.url
]),
m(Tiles(postTypes, [ 'reply', 'bookmark', 'like', 'rsvp' ]))
m(Tiles(postTypes, [ 'reply', 'bookmark', 'like', 'rsvp' ], parameterList.toString()))
])
}
}
Expand Down

0 comments on commit dd443c4

Please sign in to comment.