This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| createContext, | |
| useCallback, | |
| useContext, | |
| useEffect, | |
| useMemo, | |
| useRef, | |
| useState, | |
| } from 'react'; | |
| import AsyncStorage from '@react-native-async-storage/async-storage'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { memo, useMemo, useRef, useState } from 'react'; | |
| import { Platform, StyleProp, View, ViewStyle } from 'react-native'; | |
| import { WebView, WebViewMessageEvent } from 'react-native-webview'; | |
| interface RNKaTeXProps { | |
| math: string; | |
| displayMode?: boolean; | |
| fontSize?: number; | |
| macros?: Record<string, string>; | |
| transparent?: boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {ExpoConfig} from '@expo/config'; | |
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | |
| // @ts-ignore:next-line | |
| const IS_DEV = process.env?.ENVIRONMENT === 'development'; | |
| const IS_STAGING = process.env?.ENVIRONMENT === 'staging'; | |
| const config: ExpoConfig = { | |
| ..., | |
| android: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useRef } from 'react'; | |
| function useRequestAnimationFrame(isRunning: boolean, callback: () => void) { | |
| const interval = 1000; // 1 second in milliseconds | |
| const startTimeRef = useRef<number | null>(null); // Track the start time | |
| const animationFrameIdRef = useRef<number | null>(null); // Track the animation frame ID | |
| useEffect(() => { | |
| if (!isRunning) { | |
| // If not running, cancel any ongoing animation frame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'katex/dist/katex.min.css'; | |
| import { memo } from 'react'; | |
| import ReactMarkdown from 'react-markdown'; | |
| import { ContentRegion } from '~/models'; | |
| import Latex from 'react-latex-next'; | |
| import { formatTranscriptionsForDisplay, getPageTranscriptionsByFormat } from '~/lib/transcribe/utils'; | |
| interface TranscriptTextProps { | |
| contentRegions?: ContentRegion[]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {useCallback, useRef} from 'react'; | |
| type BaseFunction = (...args: any[]) => any; | |
| /** | |
| * Custom hook for creating a debounced callback function. | |
| * | |
| * @param {BaseFunction} callback - The callback function to be debounced. | |
| * @param {number} delay - The delay in milliseconds for the debounce. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CarAudit - Mobile App | |
| // 14.11.2023 | |
| // | |
| // ππ BusinessCases | |
| // Swagger endpoint info: https://api.dev.teasdev.com/car-audit/v1/doc/datagridV5#/default/data | |
| // Endpoint url like: https://api.stage.omnetic.dev/dms/v5/data-grid/business-case/data | |
| enum BusinessCaseStateKey { | |
| CONCEPT = 'CONCEPT', | |
| OFFER = 'OFFER', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CarAudit - Mobile App | |
| // 14.11.2023 | |
| // | |
| // ππ Vehicles | |
| // Swagger endpoint info: https://api.dev.teasdev.com/car-audit/v1/doc/app#/Vehicle/vehiclesV6 | |
| // Endpoint url like: https://api.dev.omnetic.dev/car-audit/v6/vehicles?offset=${number}&limit={number}&branchId={string}&custom={VehicleListingFilter} | |
| enum VehicleListingFilter { | |
| ALL = 'all', | |
| MY_CARS = 'myCars', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| settings: { | |
| react: { | |
| version: '18', | |
| }, | |
| }, | |
| parser: '@typescript-eslint/parser', | |
| extends: [ | |
| 'plugin:prettier/recommended', | |
| // enable typescript support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>PDF upload/download</title> | |
| </head> | |
| <body> | |
| <form> | |
| <label for="pdf-upload">Choose a PDF file to upload:</label> | |
| <input type="file" id="pdf-upload" name="pdf" accept=".pdf" /> |
NewerOlder