14 lines
349 B
TypeScript
14 lines
349 B
TypeScript
import { SNApplication } from '@standardnotes/snjs'
|
|
|
|
export function openSubscriptionDashboard(application: SNApplication): void {
|
|
application
|
|
.getNewSubscriptionToken()
|
|
.then((token) => {
|
|
if (!token) {
|
|
return
|
|
}
|
|
window.open(`${window.dashboardUrl}?subscription_token=${token}`)
|
|
})
|
|
.catch(console.error)
|
|
}
|