Skip to content

Instantly share code, notes, and snippets.

View thierryskoda's full-sized avatar
🎯
Focusing

Thierry Skoda thierryskoda

🎯
Focusing
View GitHub Profile
@thierryskoda
thierryskoda / gist:f8343c45f4e3edcf1d9f944775029e47
Created October 16, 2024 00:02
Ignite welcome screen component
import { observer } from "mobx-react-lite"
import { FC } from "react"
import { Image, ImageStyle, TextStyle, View, ViewStyle } from "react-native"
import { Button, Text, Screen } from "@/components"
import { isRTL } from "../i18n"
import { useStores } from "../models"
import { AppStackScreenProps } from "../navigators"
import type { ThemedStyle } from "@/theme"
import { useHeader } from "../utils/useHeader"
import { useSafeAreaInsetsStyle } from "../utils/useSafeAreaInsetsStyle"
import { useQuery } from "@tanstack/react-query"
import { queryClient } from "../../libs/react-query"
import { supabase } from "../../libs/supabase/supabase-client"
import { IUserId } from "../../types/database-custom-types"
import { APILogger } from "../../utils/logger"
export function getUserByIdQueryKey(userId: IUserId) {
return ["get-user-by-id-" + userId]
}
<Form
fields={FIELDS}
onSubmit={handleSubmit}
/>
const FIELDS = [
{
label: 'First Name',
path: 'firstName',
width: '1-2'
},
{
label: 'Last name',
path: 'lastName',
width: '1-2'