- Added GlobalErrorScreen and ListErrorView for improved error display. - Enhanced ErrorBoundary to support custom fallback rendering. - Integrated crashlytics initialization in the app startup process. - Updated various components to utilize the new error handling structure. - Fixed import paths for OTPWindow component. Signed-off-by: Innei <tukon479@gmail.com>
20 lines
455 B
TypeScript
20 lines
455 B
TypeScript
import crashlytics from "@react-native-firebase/crashlytics"
|
|
|
|
import { whoami } from "../store/user/getters"
|
|
|
|
export const initCrashlytics = async () => {
|
|
const user = whoami()
|
|
if (user) {
|
|
await Promise.all([
|
|
crashlytics().setUserId(user.id),
|
|
crashlytics().setAttributes({
|
|
email: user.email ?? "",
|
|
name: user.name ?? "",
|
|
handle: user.handle ?? "",
|
|
}),
|
|
])
|
|
}
|
|
|
|
crashlytics().log("User signed in.")
|
|
}
|