Load locale ondemand + spanish locale (#249)

This commit is contained in:
Luke Vella 2022-07-28 10:39:58 +01:00 committed by GitHub
parent 0f35bd0518
commit c2aea134ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 700 additions and 455 deletions

View file

@ -1,4 +1,3 @@
import dayjs from "dayjs";
import Head from "next/head";
import Link from "next/link";
import { useTranslation } from "next-i18next";
@ -8,6 +7,7 @@ import Calendar from "@/components/icons/calendar.svg";
import Pencil from "@/components/icons/pencil.svg";
import User from "@/components/icons/user.svg";
import { useDayjs } from "../utils/dayjs";
import { trpc } from "../utils/trpc";
import { EmptyState } from "./empty-state";
import LoginForm from "./login-form";
@ -16,6 +16,7 @@ import { useSession } from "./session";
export const Profile: React.VoidFunctionComponent = () => {
const { user } = useSession();
const { dayjs } = useDayjs();
const { t } = useTranslation("app");
const { data: userPolls } = trpc.useQuery(["user.getPolls"]);