fix: [CAL-3374] Says Number is not Verified, but it is Verified (#14531)

* fix: [CAL-3374] Says Number is not Verified, but it is Verified

* clearing error only when verified

* type-checks fixed

* chore: improvement

---------

Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-04-12 11:33:24 -04:00
1 parent f58f5e4e02
commit ac858c9bee
88 files changed
+109 -126

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ import SkeletonLoader from "@components/availability/SkeletonLoader";
export function AvailabilityList({ schedules }: RouterOutputs["viewer"]["availability"]["list"]) {
const { t } = useLocale();
const [bulkUpdateModal, setBulkUpdateModal] = useState(false);
const utils = trpc.useContext();
const utils = trpc.useUtils();
const meQuery = trpc.viewer.me.useQuery();
@@ -93,7 +93,7 @@ const AppearanceView = ({
hasPaidPlan: boolean;
}) => {
const { t } = useLocale();
const utils = trpc.useContext();
const utils = trpc.useUtils();
const [darkModeError, setDarkModeError] = useState(false);
const [lightModeError, setLightModeError] = useState(false);
const [isCustomBrandColorChecked, setIsCustomBranColorChecked] = useState(
@@ -60,7 +60,7 @@ const GeneralQueryView = () => {
};
const GeneralView = ({ localeProp, user }: GeneralViewProps) => {
const utils = trpc.useContext();
const utils = trpc.useUtils();
const { t } = useLocale();
const { update } = useSession();
const [isUpdateBtnLoading, setIsUpdateBtnLoading] = useState<boolean>(false);
@@ -94,7 +94,7 @@ export type FormValues = {
const ProfileView = () => {
const { t } = useLocale();
const utils = trpc.useContext();
const utils = trpc.useUtils();
const { update } = useSession();
const { data: user, isPending } = trpc.viewer.me.useQuery({ includePasswordAdded: true });
@@ -23,7 +23,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st
const ProfileImpersonationView = ({ user }: { user: RouterOutputs["viewer"]["me"] }) => {
const { t } = useLocale();
const utils = trpc.useContext();
const utils = trpc.useUtils();
const [disableImpersonation, setDisableImpersonation] = useState<boolean | undefined>(
user?.disableImpersonation
);
@@ -61,7 +61,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st
const PasswordView = ({ user }: PasswordViewProps) => {
const { data } = useSession();
const { t } = useLocale();
const utils = trpc.useContext();
const utils = trpc.useUtils();
const metadata = userMetadataSchema.safeParse(user?.metadata);
const initialSessionTimeout = metadata.success ? metadata.data?.sessionTimeout : undefined;
@@ -34,7 +34,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st
};
const TwoFactorAuthView = () => {
const utils = trpc.useContext();
const utils = trpc.useUtils();
const { t } = useLocale();
const { data: user, isPending } = trpc.viewer.me.useQuery({ includePasswordAdded: true });