Skip to content

Commit

Permalink
better cta when already a mutiny+ sub
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul authored and benthecarman committed Oct 3, 2023
1 parent 7a962c5 commit a1b9480
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/components/MutinyPlusCta.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ParentComponent } from "solid-js";
import { ParentComponent, Show } from "solid-js";
import { A } from "solid-start";

import forward from "~/assets/icons/forward.svg";
import { useI18n } from "~/i18n/context";
import { useMegaStore } from "~/state/megaStore";

export const CtaCard: ParentComponent = (props) => {
return (
Expand All @@ -18,6 +19,7 @@ export const CtaCard: ParentComponent = (props) => {
};

export function MutinyPlusCta() {
const [state, _actions] = useMegaStore();
const i18n = useI18n();
return (
<CtaCard>
Expand All @@ -32,7 +34,12 @@ export function MutinyPlusCta() {
<img src={forward} alt="go" />
</div>
<div class="text-sm text-m-grey-400">
{i18n.t("settings.plus.cta_description")}
<Show
when={state.mutiny_plus}
fallback={i18n.t("settings.plus.cta_description")}
>
{i18n.t("settings.plus.cta_but_already_plus")}
</Show>
</div>
</A>
</CtaCard>
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/en/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ export default {
multi_device: "Multi-device access",
more: "... and more to come",
cta_description:
"Enjoy early access to new features and premium functionality."
"Enjoy early access to new features and premium functionality.",
cta_but_already_plus: "Thank you for your support!"
},
restore: {
title: "Restore",
Expand Down

0 comments on commit a1b9480

Please sign in to comment.