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, useEffect, useRef } from "react"; | |
| const COINS = [ | |
| { symbol: "BTC", color: "#F7931A", x: 18, y: 22 }, | |
| { symbol: "ETH", color: "#627EEA", x: 78, y: 15 }, | |
| { symbol: "SOL", color: "#9945FF", x: 85, y: 72 }, | |
| { symbol: "USDC", color: "#2775CA", x: 10, y: 68 }, | |
| ]; | |
| function FloatingCoin({ symbol, color, x, y, delay }) { |
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, useEffect, useRef, useCallback } from 'react' | |
| // ─── Wave Visualizer ────────────────────────────────────────────────────────── | |
| const NUM_BARS = 70 | |
| function WaveVisualizer() { | |
| const canvasRef = useRef(null) | |
| const rafRef = useRef(null) | |
| const tRef = useRef(0) | |
| const phasesRef = useRef(null) |
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 { | |
| DEFINIR_OPERACION, | |
| RESETEAR_CALCULADORA, | |
| RESETEAR_OPERACION, | |
| MOSTRAR_RESULTADO | |
| } from "../types"; | |
| export default (state, action) => { | |
| switch (action.type) { |
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 { useReducer } from 'react'; | |
| import OperacionContext from './OperacionContext'; | |
| import OperacionReducer from './OperacionReducer'; | |
| import { | |
| DEFINIR_OPERACION, | |
| RESETEAR_CALCULADORA, | |
| RESETEAR_OPERACION, | |
| MOSTRAR_RESULTADO | |
| } from '../types'; |
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 } from "react"; | |
| export const OperacionContext = createContext(); | |
| export default OperacionContext; |
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
| export const DEFINIR_OPERACION = 'DEFINIR_OPERACION'; | |
| export const MOSTRAR_OPERACION = 'MOSTRAR_OPERACION'; | |
| export const MOSTRAR_RESULTADO = 'MOSTRAR_RESULTADO'; | |
| export const RESETEAR_OPERACION = 'RESETEAR_OPERACION'; | |
| export const RESETEAR_CALCULADORA = 'RESETEAR_CALCULADORA'; |
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 { useReducer } from "react"; | |
| import NameReducer from './nameReducer'; | |
| import NameContext from "./nameContext"; | |
| import { | |
| TYPE_NAME, | |
| } from "../types"; | |
| const NameState = props => { |
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 { | |
| TYPE_NAME | |
| } from "../types"; | |
| export default (state, action) => { | |
| switch (action.type) { | |
| case TYPE_NAME: | |
| return { |
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 } from "react"; | |
| const nameContext = createContext(); | |
| export default nameContext; |
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 useSelect from "../hooks/useSelect"; | |
| const [servicio, SelectServicio] = useSelect('Selecciona el Servicio', servicios, values.servicio || hospedaje.servicio); | |
| const [noches, SelectNoches] = useSelect('Selecciona las Noches', nochesHospedaje, values.noches || hospedaje.noches); | |
| const [zona, SelectZona] = useSelect('Selecciona la Zona', zonas, values.zona || hospedaje.zona); |
NewerOlder