{isTotpRequired && (
-
-
+
+
Two-factor authentication
@@ -243,10 +243,8 @@ export function SignIn() {
)}
)}
-
-
+
+
Sign in to your account
diff --git a/packages/app/features/auth/SignUp.tsx b/packages/app/features/auth/SignUp.tsx
index ee10342..38ef860 100644
--- a/packages/app/features/auth/SignUp.tsx
+++ b/packages/app/features/auth/SignUp.tsx
@@ -8,7 +8,7 @@ import { ShieldAlert } from "lucide-react-native";
import { signIn } from "next-auth/react";
import { useForm } from "react-hook-form";
import { Link } from "solito/link";
-import { useRouter, useSearchParams } from "solito/navigation";
+import { useSearchParams } from "solito/navigation";
import { InviteInfo } from "@homefront/app/features/auth/InviteInfo";
import { setRecoveryPhrase } from "@homefront/app/utils/recovery-phrase-store";
@@ -51,6 +51,7 @@ export function SignUp() {
const { username, password } = values;
const inviteCode = redirect ? getInviteCodeFromRedirect(redirect) : null;
+ console.log("inviteCode", inviteCode);
try {
const res = await fetch("/api/auth/signup", {
method: "POST",
@@ -150,8 +151,8 @@ export function SignUp() {
{redirect && }
-
-
+
+
Sign up for Homefront
-
+
diff --git a/packages/app/features/auth/types.ts b/packages/app/features/auth/types.ts
index d26a6bf..ba5ce59 100644
--- a/packages/app/features/auth/types.ts
+++ b/packages/app/features/auth/types.ts
@@ -1,4 +1,4 @@
-import { AuthError, LoginResponse } from "@homefront/auth";
+import type { LoginResponse } from "@homefront/auth";
export interface SessionCredentials {
username: string;
diff --git a/packages/app/features/avatars/AvatarInfo.tsx b/packages/app/features/avatars/AvatarInfo.tsx
index ce2fcb1..d649727 100644
--- a/packages/app/features/avatars/AvatarInfo.tsx
+++ b/packages/app/features/avatars/AvatarInfo.tsx
@@ -22,8 +22,8 @@ export const AvatarInfo = () => {
isRefetching,
} = api.avatars.getRandomAvatar.useQuery();
- const handleRefetch = () => {
- refetch();
+ const handleRefetch = async () => {
+ await refetch();
};
const pronoun = NOT_PEOPLE.includes(avatar?.displayName ?? "")
@@ -66,7 +66,7 @@ export const AvatarInfo = () => {
Get inspired by {pronoun}:
-
+
{avatar.displayName}
@@ -81,6 +81,7 @@ export const AvatarInfo = () => {
)}
-
+ Cancel
diff --git a/packages/app/features/domainAreas/DomainAreaTags.tsx b/packages/app/features/domainAreas/DomainAreaTags.tsx
index 5a1559b..6d5fa08 100644
--- a/packages/app/features/domainAreas/DomainAreaTags.tsx
+++ b/packages/app/features/domainAreas/DomainAreaTags.tsx
@@ -1,11 +1,13 @@
import { useId } from "react";
-import { View, ViewProps } from "react-native";
+import type { ViewProps } from "react-native";
+import { View } from "react-native";
import type { DomainArea } from "@homefront/db";
+import type {
+ DomainAreaProps} from "@homefront/ui";
import {
cn,
DomainArea as DomainAreaIcon,
- DomainAreaProps,
Text,
} from "@homefront/ui";
diff --git a/packages/app/features/domainAreas/DomainAreasSelector.tsx b/packages/app/features/domainAreas/DomainAreasSelector.tsx
index f00fb16..cbe6417 100644
--- a/packages/app/features/domainAreas/DomainAreasSelector.tsx
+++ b/packages/app/features/domainAreas/DomainAreasSelector.tsx
@@ -1,12 +1,13 @@
import { Pressable, ScrollView, useWindowDimensions, View } from "react-native";
import { api } from "@homefront/app/utils/trpc";
-import { DomainArea } from "@homefront/db";
+import type { DomainArea } from "@homefront/db";
+import type {
+ DomainAreaProps} from "@homefront/ui";
import {
ActivityIndicator,
cn,
DomainArea as DomainAreaIcon,
- DomainAreaProps,
Text,
} from "@homefront/ui";
@@ -124,7 +125,7 @@ export function DomainAreaSelector({
{getRows(domainAreas ?? []).map((row, i) => (
- {row?.map((domainArea) => (
+ {row.map((domainArea) => (
{
setIsCustomAmount(false);
form.setValue("type", value);
- form.setValue("amount", getAmounts(value)[0]!.value);
+ form.setValue("amount", getAmounts(value)[0]?.value ?? 0);
};
const handleContinue = () => {
@@ -70,11 +70,6 @@ export function AmountStep({
}
}, []);
- useEffect(() => {
- if (isLoading) {
- }
- }, [isLoading]);
-
return (
@@ -119,7 +114,7 @@ export function AmountStep({
-
+
{getSupportUsHeader(type)}
@@ -219,7 +214,7 @@ export function AmountStep({
field.onChange(sanitizedValue);
}
}}
- value={String(field.value ?? "")}
+ value={String(field.value)}
inputIcon={}
inputIconClassName="left-0 right-auto"
inputClassName="pl-8 font-bold text-base"
diff --git a/packages/app/features/donations/CallToAction.tsx b/packages/app/features/donations/CallToAction.tsx
index 73f2101..f967aa6 100644
--- a/packages/app/features/donations/CallToAction.tsx
+++ b/packages/app/features/donations/CallToAction.tsx
@@ -1,9 +1,9 @@
import { View } from "react-native";
-import { ArrowRight, HandHelping, HeartHandshake } from "lucide-react-native";
+import { ArrowRight, HeartHandshake } from "lucide-react-native";
import { Link } from "solito/link";
import { api } from "@homefront/app/utils/trpc";
-import { ActivityIndicator, Button, H3, P, Text } from "@homefront/ui";
+import { ActivityIndicator, Button, H3, Text } from "@homefront/ui";
export function CallToAction() {
const { data: isCustomer, isLoading } =
@@ -25,9 +25,9 @@ export function CallToAction() {
-
+
-
+
Support Homefront
@@ -40,7 +40,7 @@ export function CallToAction() {
-
+
Support us
@@ -48,7 +48,7 @@ export function CallToAction() {
-
+
Fund our fight for democracy
diff --git a/packages/app/features/donations/DonateScreen.tsx b/packages/app/features/donations/DonateScreen.tsx
index efcb11c..208db2f 100644
--- a/packages/app/features/donations/DonateScreen.tsx
+++ b/packages/app/features/donations/DonateScreen.tsx
@@ -13,7 +13,7 @@ export function DonateScreen() {
-
+
Join the fight for democracy
diff --git a/packages/app/features/donations/DonationForm.tsx b/packages/app/features/donations/DonationForm.tsx
index 4fa260c..76addc3 100644
--- a/packages/app/features/donations/DonationForm.tsx
+++ b/packages/app/features/donations/DonationForm.tsx
@@ -6,9 +6,9 @@ import { loadStripe } from "@stripe/stripe-js";
import { LockKeyhole } from "lucide-react-native";
import { useForm } from "react-hook-form";
+import type { DonationType } from "@homefront/db";
import type { DonationFormData } from "@homefront/validators";
import { api } from "@homefront/app/utils/trpc";
-import { DonationType } from "@homefront/db";
import { ActivityIndicator, Text } from "@homefront/ui";
import { DonationFormSchema } from "@homefront/validators";
@@ -21,7 +21,7 @@ export enum DonationStep {
PAYMENT = "payment",
}
const stripePromise = loadStripe(
- process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!,
+ process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY ?? "",
);
export function DonationForm() {
@@ -49,7 +49,7 @@ export function DonationForm() {
const { mutateAsync: initiateDonation } =
api.donations.initiateDonation.useMutation({
- onSuccess: ({ customerSession, paymentIntent, clientSecret }) => {
+ onSuccess: ({ customerSession, clientSecret }) => {
setClientSecret(clientSecret);
setCustomerSessionClientSecret(customerSession.client_secret);
setStep(DonationStep.PAYMENT);
@@ -61,7 +61,7 @@ export function DonationForm() {
const createCustomer = api.donations.createCustomer.useMutation({});
const findOrCreateCustomer = async () => {
- if (customer && customer.stripeCustomerId) {
+ if (customer?.stripeCustomerId) {
return Promise.resolve(customer);
}
diff --git a/packages/app/features/donations/DonationSummary.tsx b/packages/app/features/donations/DonationSummary.tsx
index 0e16102..6741a05 100644
--- a/packages/app/features/donations/DonationSummary.tsx
+++ b/packages/app/features/donations/DonationSummary.tsx
@@ -1,7 +1,7 @@
-import { Button, View } from "react-native";
-import { Banknote, Pencil } from "lucide-react-native";
+import { View } from "react-native";
+import { Banknote } from "lucide-react-native";
-import { DonationType } from "@homefront/db";
+import type { DonationType } from "@homefront/db";
import { Text } from "@homefront/ui";
function getPaymentTypeLabel(type: string) {
diff --git a/packages/app/features/donations/DonationsScreen.tsx b/packages/app/features/donations/DonationsScreen.tsx
index 531bf08..e9bb88a 100644
--- a/packages/app/features/donations/DonationsScreen.tsx
+++ b/packages/app/features/donations/DonationsScreen.tsx
@@ -1,10 +1,10 @@
"use client";
+import type Stripe from "stripe";
import { useState } from "react";
import { SafeAreaView, ScrollView, View } from "react-native";
import { ArrowRight, CreditCard } from "lucide-react-native";
import { Link } from "solito/link";
-import Stripe from "stripe";
import { api } from "@homefront/app/utils/trpc";
import { ActivityIndicator, Button, H3, Text } from "@homefront/ui";
@@ -55,28 +55,28 @@ export function DonationsScreen() {
-
+
-
+
Your Donations
-
-
+
+
You haven't made any donations yet.
-
+
Fund our fight for democracy
-
+
Support us
@@ -97,9 +97,9 @@ export function DonationsScreen() {
-
+
-
diff --git a/packages/app/features/onboarding/RecoveryPhrase.tsx b/packages/app/features/onboarding/RecoveryPhrase.tsx
index e13992c..fb7c84e 100644
--- a/packages/app/features/onboarding/RecoveryPhrase.tsx
+++ b/packages/app/features/onboarding/RecoveryPhrase.tsx
@@ -175,7 +175,7 @@ export function RecoveryPhrase() {
Your recovery phrase is a series of 12 words in a specific order.
-
+
@@ -185,29 +185,29 @@ export function RecoveryPhrase() {
password.
-
+ Tips:
-
+
Store this phrase in a password manager like 1Password or Proton
Pass.
-
+
Write this phrase down on a piece of paper and store it in a
secure location.
-
+ Memorize this phrase.
-
+
-
+
{recoveryPhrase ? (
Download this phrase
@@ -222,7 +222,7 @@ export function RecoveryPhrase() {
-
+
Recovery phrase
{isLoading && (
diff --git a/packages/app/features/onboarding/RecoveryPhraseGenerator.tsx b/packages/app/features/onboarding/RecoveryPhraseGenerator.tsx
index ec7e2eb..f649a5c 100644
--- a/packages/app/features/onboarding/RecoveryPhraseGenerator.tsx
+++ b/packages/app/features/onboarding/RecoveryPhraseGenerator.tsx
@@ -83,7 +83,7 @@ export const RecoveryPhraseGenerator = ({
return (
@@ -92,7 +92,7 @@ export const RecoveryPhraseGenerator = ({
If you forgot to store it, you can generate a new one.