peertube-plugin-ncd-sell-st.../client/pages/cancel.js
2023-12-12 19:42:42 -05:00

16 lines
599 B
JavaScript

async function showPage({ rootEl, peertubeHelpers }) {
// Redirect to login page if not auth
if (!peertubeHelpers.isLoggedIn()) return (window.location.href = "/login");
const settings = await peertubeHelpers.getSettings();
const description = await peertubeHelpers.markdownRenderer.enhancedMarkdownToHTML(settings["sell-cancel-description"]);
rootEl.innerHTML = `
<div class="ncd-content text-center mt-5">
<h1>${await peertubeHelpers.translate("Subscription canceled.")}</h1>
<p>${description}</p>
</div>
`;
}
export { showPage };