From d11ed6f19ac2fdf5ca5185bd1d33c19829b18ccd Mon Sep 17 00:00:00 2001 From: Henrique Leite Date: Tue, 21 Nov 2023 10:40:16 -0300 Subject: [PATCH] Add Timezone --- src/app/(public)/conta/page.tsx | 24 +++++++++++++++++++++++- src/types/enums/timezone.ts | 18 ++++++++++++++++++ tailwind.config.ts | 5 +++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 src/types/enums/timezone.ts diff --git a/src/app/(public)/conta/page.tsx b/src/app/(public)/conta/page.tsx index 2d3f058..f438c7a 100644 --- a/src/app/(public)/conta/page.tsx +++ b/src/app/(public)/conta/page.tsx @@ -1,9 +1,13 @@ +"use client"; + import { bankAccounts, cards, categories, plans } from "assets/data"; import { Header } from "components/Header"; import { Icon, IconType } from "components/Icon"; +import { SelectInput } from "components/Inputs/Select"; import { Space } from "components/Space"; import Link from "next/link"; import { CardTypeEnum, isPrepaid } from "types/enums/card-type"; +import { TimezoneEnum } from "types/enums/timezone"; interface PremiumBenefit { title: string; @@ -165,12 +169,30 @@ const Account = () => { Vincular conta ao Google + + + + ({ + title: t.split("/").pop()!.replace(/_/g, " "), + value: t, + }))} + fieldNames={{ + id: "value", + label: "title", + }} + value={TimezoneEnum["America/Sao_Paulo"]} + onChange={() => {}} + />
diff --git a/src/types/enums/timezone.ts b/src/types/enums/timezone.ts new file mode 100644 index 0000000..1621f31 --- /dev/null +++ b/src/types/enums/timezone.ts @@ -0,0 +1,18 @@ +export enum TimezoneEnum { + "America/Araguaina" = "America/Araguaina", //'-03:00' + "America/Bahia" = "America/Bahia", //'-03:00' + "America/Belem" = "America/Belem", //'-03:00' + "America/Boa_Vista" = "America/Boa_Vista", //'-04:00' + "America/Campo_Grande" = "America/Campo_Grande", //'-04:00' + "America/Cuiaba" = "America/Cuiaba", //'-04:00' + "America/Eirunepe" = "America/Eirunepe", //'-05:00' + "America/Fortaleza" = "America/Fortaleza", //'-03:00' + "America/Maceio" = "America/Maceio", //'-03:00' + "America/Manaus" = "America/Manaus", //'-04:00' + "America/Noronha" = "America/Noronha", //'-02:00' + "America/Porto_Velho" = "America/Porto_Velho", //'-04:00' + "America/Recife" = "America/Recife", //'-03:00' + "America/Rio_Branco" = "America/Rio_Branco", //'-05:00' + "America/Santarem" = "America/Santarem", //'-03:00' + "America/Sao_Paulo" = "America/Sao_Paulo", //'-03:00' +} diff --git a/tailwind.config.ts b/tailwind.config.ts index 1c87712..86b3e80 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -44,6 +44,11 @@ module.exports = { ".btn-google": { "background-color": "#ffffff", border: "1px solid #747775", + + "&.disabled": { + "background-color": "#30303020", + "pointer-events": "none", + }, }, ".btn-google:hover": { "background-color": "#30303008",