Changing support -> donate. #59
This commit is contained in:
parent
9fa6954a04
commit
0bdd08d018
|
@ -1 +1 @@
|
||||||
Subproject commit 3aadc092ceba43fee043391900b1109b7753f70b
|
Subproject commit e4067b8c02e8dbd9e9375518d8e28155f98cd733
|
|
@ -2,6 +2,7 @@ import { Component } from "inferno";
|
||||||
import { Helmet } from "inferno-helmet";
|
import { Helmet } from "inferno-helmet";
|
||||||
import { i18n } from "../i18next";
|
import { i18n } from "../i18next";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next";
|
||||||
|
import { isBrowser } from "../utils";
|
||||||
|
|
||||||
const title = i18n.t("about_title");
|
const title = i18n.t("about_title");
|
||||||
|
|
||||||
|
@ -9,6 +10,13 @@ export class About extends Component<any, any> {
|
||||||
constructor(props: any, context: any) {
|
constructor(props: any, context: any) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (isBrowser()) {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class DonateLines extends Component<any, any> {
|
||||||
<>
|
<>
|
||||||
<p>
|
<p>
|
||||||
<T i18nKey="donate_desc">
|
<T i18nKey="donate_desc">
|
||||||
#<Link to="/support">#</Link>#
|
#<Link to="/donate">#</Link>#
|
||||||
</T>
|
</T>
|
||||||
</p>
|
</p>
|
||||||
<div class="row is-horizontal-align">
|
<div class="row is-horizontal-align">
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { i18n } from "../i18next";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next";
|
||||||
import { translators } from "../translations/translators";
|
import { translators } from "../translations/translators";
|
||||||
import { languagesAll, countries } from "countries-list";
|
import { languagesAll, countries } from "countries-list";
|
||||||
|
import { isBrowser } from "../utils";
|
||||||
|
|
||||||
const title = i18n.t("support_title");
|
const title = i18n.t("support_title");
|
||||||
const avatarSize = 40;
|
const avatarSize = 40;
|
||||||
|
@ -85,10 +86,17 @@ export interface Translator {
|
||||||
link?: string;
|
link?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Support extends Component<any, any> {
|
export class Donate extends Component<any, any> {
|
||||||
constructor(props: any, context: any) {
|
constructor(props: any, context: any) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (isBrowser()) {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
|
@ -13,7 +13,7 @@ export class LinkLine extends Component<any, any> {
|
||||||
<Link to="/instances">{i18n.t("join")}</Link>
|
<Link to="/instances">{i18n.t("join")}</Link>
|
||||||
<Link to="/about">{i18n.t("about")}</Link>
|
<Link to="/about">{i18n.t("about")}</Link>
|
||||||
<Link to="/apps">{i18n.t("apps")}</Link>
|
<Link to="/apps">{i18n.t("apps")}</Link>
|
||||||
<Link to="/support">{i18n.t("support")}</Link>
|
<Link to="/donate">{i18n.t("donate")}</Link>
|
||||||
<a href={`/docs/${getDocsLanguage(i18n.language)}/index.html`}>
|
<a href={`/docs/${getDocsLanguage(i18n.language)}/index.html`}>
|
||||||
{i18n.t("docs")}
|
{i18n.t("docs")}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Helmet } from "inferno-helmet";
|
||||||
import { DonateLines } from "./donate-lines";
|
import { DonateLines } from "./donate-lines";
|
||||||
import { i18n } from "../i18next";
|
import { i18n } from "../i18next";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next";
|
||||||
import { getDocsLanguage } from "../utils";
|
import { getDocsLanguage, isBrowser } from "../utils";
|
||||||
|
|
||||||
const title = i18n.t("lemmy_title");
|
const title = i18n.t("lemmy_title");
|
||||||
|
|
||||||
|
@ -13,6 +13,11 @@ export class Main extends Component<any, any> {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (isBrowser()) {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
joinServer() {
|
joinServer() {
|
||||||
return (
|
return (
|
||||||
<Link className="button primary" to="/instances">
|
<Link className="button primary" to="/instances">
|
||||||
|
@ -257,7 +262,7 @@ export class Main extends Component<any, any> {
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2>
|
<h2>
|
||||||
<Link to="/support">{i18n.t("support_donate")}</Link>
|
<Link to="/donate">{i18n.t("support_donate")}</Link>
|
||||||
</h2>
|
</h2>
|
||||||
<DonateLines />
|
<DonateLines />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Main } from "./components/main";
|
||||||
import { Apps } from "./components/apps";
|
import { Apps } from "./components/apps";
|
||||||
import { Instances } from "./components/instances";
|
import { Instances } from "./components/instances";
|
||||||
import { Contact } from "./components/contact";
|
import { Contact } from "./components/contact";
|
||||||
import { Support } from "./components/support";
|
import { Donate } from "./components/donate";
|
||||||
import { About } from "./components/about";
|
import { About } from "./components/about";
|
||||||
|
|
||||||
export const routes: IRouteProps[] = [
|
export const routes: IRouteProps[] = [
|
||||||
|
@ -35,6 +35,11 @@ export const routes: IRouteProps[] = [
|
||||||
{
|
{
|
||||||
path: `/support`,
|
path: `/support`,
|
||||||
exact: true,
|
exact: true,
|
||||||
component: Support,
|
component: Donate,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: `/donate`,
|
||||||
|
exact: true,
|
||||||
|
component: Donate,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -14,3 +14,7 @@ let SHORTNUM_SI_FORMAT = new Intl.NumberFormat("en-US", {
|
||||||
export function numToSI(value: any) {
|
export function numToSI(value: any) {
|
||||||
return SHORTNUM_SI_FORMAT.format(value);
|
return SHORTNUM_SI_FORMAT.format(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isBrowser() {
|
||||||
|
return typeof window !== "undefined";
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue