Skip to content

Instantly share code, notes, and snippets.

View Karthik-B-06's full-sized avatar
๐Ÿ™
trying to create and solve problems with code

Karthik Karthik-B-06

๐Ÿ™
trying to create and solve problems with code
View GitHub Profile
import React, { useEffect, useMemo, useState } from 'react';
import { Pressable, View } from 'react-native';
import { PlayBackType } from 'react-native-audio-recorder-player';
import Animated, { FadeIn, FadeOut, useSharedValue } from 'react-native-reanimated';
import { Slider } from '~/components/Slider';
import { Spinner } from '~/components/Spinner';
import { useAudioPlayer } from '~/store/useAudioPlayer';
import { PauseIcon, PlayIcon } from '~/svg';
import { tailwind } from '~/theme/tailwind';
import React from 'react';
import { LayoutChangeEvent, StyleSheet } from 'react-native';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
import Animated, {
clamp,
Extrapolate,
interpolate,
runOnJS,
SharedValue,
useAnimatedReaction,
import React, { useCallback } from "react";
import {
NativeSyntheticEvent,
Platform,
Pressable,
TextInputContentSizeChangeEventData,
TextInputProps,
} from "react-native";
import Animated, {
Layout,
const AudioPlayer = (props: AudioPlayerProps) => {
const { audioSrc } = props;
const [isPlaying, setIsPlaying] = useState(false);
const [isSoundLoading, setSoundLoadStatus] = useState(true);
const { position, duration } = useProgress();
const currentPosition = useDerivedValue(() => Math.round(position));
const totalDuration = useDerivedValue(() => Math.round(duration));
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
import {
Alert,
Dimensions,
Pressable,
StatusBar,
StyleSheet,
Text,
TextInput,
View,
import { NativeStackScreenProps } from "@react-navigation/native-stack";
import React, { useEffect, useRef } from "react";
import { useForm } from "react-hook-form";
import { Dimensions, Pressable, StyleSheet, Text, TextInput } from "react-native";
import Animated, { Easing, FadeIn, FadeInDown, interpolate, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
import { SafeAreaView } from "react-native-safe-area-context";
import Svg, { Path } from "react-native-svg";
import tw from "twrnc";
import { AuthStackParamList } from "../../../App";
import useToastStore, { defaultToastValues } from "../../store/useToastStore";
import { NativeStackScreenProps } from "@react-navigation/native-stack";
import React, { useEffect, useRef } from "react";
import { useForm } from "react-hook-form";
import { Dimensions, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
import Animated, { Easing, FadeIn, FadeInDown, interpolate, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
import { SafeAreaView } from "react-native-safe-area-context";
import Svg, { Path } from "react-native-svg";
import tw from "twrnc";
import { AuthStackParamList } from "../../../App";
import useToastStore, { defaultToastValues } from "../../store/useToastStore";
import { NativeStackScreenProps } from "@react-navigation/native-stack";
import React from "react";
import { Dimensions, Image, Pressable, StyleSheet, Text } from "react-native";
import Animated, { FadeIn, FadeInDown } from "react-native-reanimated";
import { SafeAreaView } from "react-native-safe-area-context";
import { AuthStackParamList } from "../../../App";
type OnboardingProps = NativeStackScreenProps<AuthStackParamList, "Onboarding">;
const OnboardingScreen: React.FC<OnboardingProps> = (props) => {