Skip to content

Instantly share code, notes, and snippets.

View vanGalilea's full-sized avatar
:octocat:

Steve Galili vanGalilea

:octocat:
View GitHub Profile
@vanGalilea
vanGalilea / fixAdyen.js
Created January 21, 2025 19:52
A custom Expo plugin to make the Adyen React Native library compatible with Expo SDK 52.
const { withMainActivity } = require("@expo/config-plugins");
/**
* A custom Expo plugin to make the Adyen React Native library compatible with Expo SDK 52.
*
* The Adyen library currently defines the `onNewIntent` method in Kotlin with a nullable
* `Intent?` parameter, which is incorrect according to Android's API specifications.
* This mismatch causes build failures during the `:app:compileDebugKotlin` task.
*
* The plugin resolves this issue by replacing the nullable `Intent?` parameter in the
@vanGalilea
vanGalilea / FadeFlatList.tsx
Created November 26, 2024 17:13
A custom FlashList in React Native with top and bottom fading gradients that adjust dynamically based on scroll position for enhanced UX.
import { FlashList } from "@shopify/flash-list";
import { FlashListProps } from "@shopify/flash-list/src/FlashListProps";
import { LinearGradient } from "expo-linear-gradient";
import React, { useCallback, useState } from "react";
import { StyleSheet, View, ViewStyle } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { NativeScrollEvent } from "react-native/Libraries/Components/ScrollView/ScrollView";
import {
LayoutChangeEvent,
NativeSyntheticEvent,
@vanGalilea
vanGalilea / enableGooglePay.js
Created July 12, 2024 12:15
Expo plugin to enable Google Pay
// add this plugin to you app.congi.js via plugins - https://docs.expo.dev/versions/latest/config/app/#plugins
//
// ...
// plugins: [
// ...
// "enableGooglePay.js"
// ]
const { AndroidConfig, withAndroidManifest } = require("@expo/config-plugins");
@vanGalilea
vanGalilea / metro.config.js
Last active January 18, 2024 11:01
React native/expo project that is a part of a mono repo
// TODO: for React Native CLI require from '@react-native/metro-config'
const {getDefaultConfig} = require('@react-native/metro-config');
// TODO: for Expo require from 'expo/metro-config'
// const {getDefaultConfig} = require('expo/metro-config');
const path = require('path');
// Find the project and workspace directories
const projectRoot = __dirname;