If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image />
and <FastImage />
(read comments):
// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />
const {
// | |
// ContentView.swift | |
// Emoji Animation hero picker | |
// | |
// Created by Moussa on 3/4/2024. | |
// | |
import SwiftUI | |
struct ContentView: View { |
import ExpoModulesCore | |
import SwiftUI | |
public class SwiftuiViewModule: Module { | |
public func definition() -> ModuleDefinition { | |
Name("SwiftuiForm") | |
View(SwiftuiView.self) { | |
Prop("name") { (view, name: String) in | |
view.name = name | |
} |
func scrollViewDidScroll(_ scrollView: UIScrollView) { | |
for (i, view) in scrollView.subviews.enumerated() { | |
var ty = 0.0 | |
if scrollView.contentOffset.y < 0 { | |
// We're scrolling past the top of the scroll view. | |
// Translate each item in the scroll view by some amount based on its index and scroll offset. | |
ty = CGFloat(i) * abs(offsetY) / 8.0 * pow(1.12, CGFloat(i)) | |
} | |
view.transform = CGAffineTransform(translationX: 0, y: ty) | |
} |
// pages/api/auth/[...nextauth.ts] | |
// Follow docs in nextauth | |
import { isSignedInUserSponsoringMe } from 'utils/github' | |
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next' | |
import NextAuth from 'next-auth' | |
import GithubProvider from 'next-auth/providers/github' | |
export default function Auth( |
If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image />
and <FastImage />
(read comments):
// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />
const {
import * as SystemUI from 'expo-system-ui'; | |
import * as React from 'react'; | |
import { Appearance, AppState, AppStateStatus, ColorSchemeName, ColorValue } from 'react-native'; | |
type ThemedColorValue = { light: ColorValue, dark: ColorValue }; | |
type Props = { backgroundColor: ColorValue | ThemedColorValue } | |
const propsStack: Props[] = []; |
// pages/api/sponsors.ts | |
import { NextApiRequest, NextApiResponse } from 'next' | |
const AV_SIZE = 32 | |
const PADDING = 4 | |
const COLS = 16 | |
type SponsorResult = { avatarUrl: string; login: string } |
import * as React from "react" | |
import { Model } from "@croquet/croquet" | |
import { CroquetContext } from "@croquet/react" | |
/** | |
* A callback that publishes the returned data to the current view's model. | |
* @param eventName The name of the event to be published. | |
* @param fn A function that returns the data to be published. | |
* @param deps (optional) An array of dependencies for the callback. | |
*/ |
_APP_ENV=production | |
_APP_LOCALE=en | |
_APP_OPTIONS_ABUSE=enabled | |
_APP_OPTIONS_FORCE_HTTPS=disabled | |
_APP_OPENSSL_KEY_V1=your-secret-key | |
_APP_DOMAIN=localhost | |
_APP_DOMAIN_TARGET=localhost | |
_APP_CONSOLE_WHITELIST_ROOT=enabled | |
_APP_CONSOLE_WHITELIST_EMAILS= | |
_APP_CONSOLE_WHITELIST_IPS= |