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 { usePrices } from "../hooks/usePrices"; //Implement your own service for fetching realtime stock prices or mock data. | |
interface SimulatedPrice { | |
price: number; | |
timestamp: Date; | |
} | |
class PriceSimulator { | |
private simulatedPrices: Map<string, SimulatedPrice> = new Map(); | |
private volatility = 0.002; // 0.2% base volatility |
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 from 'react' | |
import { Alert, Box, Typography } from '@mui/joy' | |
import Icon from 'src/_core/components/icon' | |
/** | |
* FormAlerts component | |
* @param {Object} props | |
* @param {Object} props.errors - Error object | |
* @param {string} [props.variant='soft'] - Alert variant | |
* @param {string} [props.color='danger'] - Alert color |
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
/** | |
* @fileoverview Custom Link Preview Service using Puppeteer | |
* @description Generates link previews by rendering webpages with Puppeteer | |
* @reviewed Alan Spurlock - 2024-03-20 | |
*/ | |
const puppeteer = require('puppeteer') | |
const logger = require('../../utils/logger') //Where ever you might have your logger! | |
/** |
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 { useState } from 'react' | |
import { Iconify } from 'react-native-iconify' | |
import { Card, Text, TouchableOpacity, View } from 'react-native-ui-lib' | |
export default function CollapsibleCard(props) { | |
const defaultExpanded = props.defaultExpanded || false | |
const title = props.title || 'Title' | |
const [expanded, setExpanded] = useState(defaultExpanded) |
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 { useState } from 'react' | |
import { Iconify } from 'react-native-iconify' | |
import { Colors, Text, TouchableOpacity, View } from 'react-native-ui-lib' | |
export default function ExpandableView(props) { | |
const title = props.title || 'Expandable View' | |
const defaultExpanded = props.defaultExpanded || false | |
const divider = props.divider || false | |
const [expanded, setExpanded] = useState(defaultExpanded || false) |