
* Ends the war between tRPC and next-i18next * Locale fixes * Linting * Linting * trpc i18n (not working) (#942) * simplify i18n handler and remove redundant(?) fn check * split up viewer to a "logged in only" and "public" * wip -- skip first render Co-authored-by: Omar López <zomars@me.com> * Linting * I18n fixes * We don't need serverSideTranslations in every page anymore Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Alex Johansson <alexander@n1s.se>
22 lines
743 B
TypeScript
22 lines
743 B
TypeScript
import React from "react";
|
|
|
|
import { useLocale } from "@lib/hooks/useLocale";
|
|
import { trpc } from "@lib/trpc";
|
|
|
|
import SettingsShell from "@components/SettingsShell";
|
|
import Shell from "@components/Shell";
|
|
import ChangePasswordSection from "@components/security/ChangePasswordSection";
|
|
import TwoFactorAuthSection from "@components/security/TwoFactorAuthSection";
|
|
|
|
export default function Security() {
|
|
const user = trpc.useQuery(["viewer.me"]).data;
|
|
const { t } = useLocale();
|
|
return (
|
|
<Shell heading={t("security")} subtitle={t("manage_account_security")}>
|
|
<SettingsShell>
|
|
<ChangePasswordSection />
|
|
<TwoFactorAuthSection twoFactorEnabled={user?.twoFactorEnabled} />
|
|
</SettingsShell>
|
|
</Shell>
|
|
);
|
|
}
|