diff --git a/app/lish/[did]/[publication]/dashboard/settings/PostOptions.tsx b/app/lish/[did]/[publication]/dashboard/settings/PostOptions.tsx index 169dfe11..289cc121 100644 --- a/app/lish/[did]/[publication]/dashboard/settings/PostOptions.tsx +++ b/app/lish/[did]/[publication]/dashboard/settings/PostOptions.tsx @@ -22,30 +22,40 @@ export const PostOptions = (props: { ? true : record.preferences.showComments, ); - let [showMentions, setShowMentions] = useState(true); - let [showPrevNext, setShowPrevNext] = useState(true); + let [showMentions, setShowMentions] = useState( + record?.preferences?.showMentions === undefined + ? true + : record.preferences.showMentions, + ); + let [showPrevNext, setShowPrevNext] = useState( + record?.preferences?.showPrevNext === undefined + ? true + : record.preferences.showPrevNext, + ); let toast = useToaster(); return (
{ - // if (!pubData) return; - // e.preventDefault(); - // props.setLoading(true); - // let data = await updatePublication({ - // name: record.name, - // uri: pubData.uri, - // preferences: { - // showInDiscover: - // record?.preferences?.showInDiscover === undefined - // ? true - // : record.preferences.showInDiscover, - // showComments: showComments, - // }, - // }); - // toast({ type: "success", content: "Posts Updated!" }); - // props.setLoading(false); - // mutate("publication-data"); + if (!pubData) return; + e.preventDefault(); + props.setLoading(true); + let data = await updatePublication({ + name: record.name, + uri: pubData.uri, + preferences: { + showInDiscover: + record?.preferences?.showInDiscover === undefined + ? true + : record.preferences.showInDiscover, + showComments: showComments, + showMentions: showMentions, + showPrevNext: showPrevNext, + }, + }); + toast({ type: "success", content: "Posts Updated!" }); + props.setLoading(false); + mutate("publication-data"); }} className="text-primary flex flex-col" > @@ -67,7 +77,8 @@ export const PostOptions = (props: {
Show Prev/Next Buttons
- Show buttons that navigate to the previous and next posts + Buttons at the bottom of each post navigate to the previous and next + posts
@@ -92,7 +103,8 @@ export const PostOptions = (props: {
Show Mentions
- Display a list of posts on Bluesky that mention your post + Display a list of posts on Bluesky and Leaflet that mention your + post
diff --git a/lexicons/src/publication.ts b/lexicons/src/publication.ts index 57bbbef9..fa679b3b 100644 --- a/lexicons/src/publication.ts +++ b/lexicons/src/publication.ts @@ -28,7 +28,7 @@ export const PubLeafletPublication: LexiconDoc = { showInDiscover: { type: "boolean", default: true }, showComments: { type: "boolean", default: true }, showMentions: { type: "boolean", default: true }, - showPrevNext: { type: "boolean", default: true }, + showPrevNext: { type: "boolean", default: false }, }, }, theme: {