File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { useRouter } from 'next/router'
22import DesktopHeader from './desktop/header'
33import MobileHeader from './mobile/header'
44import StickyBar from './sticky-bar'
5- import { CarouselProvider } from './carousel'
5+ import { PriceCarouselProvider } from './price- carousel'
66
77export default function Navigation ( { sub } ) {
88 const router = useRouter ( )
@@ -17,10 +17,10 @@ export default function Navigation ({ sub }) {
1717 }
1818
1919 return (
20- < CarouselProvider >
20+ < PriceCarouselProvider >
2121 < DesktopHeader { ...props } />
2222 < MobileHeader { ...props } />
2323 < StickyBar { ...props } />
24- </ CarouselProvider >
24+ </ PriceCarouselProvider >
2525 )
2626}
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ const carousel = [
1212 'halving'
1313]
1414
15- export const CarouselContext = createContext ( {
15+ export const PriceCarouselContext = createContext ( {
1616 selection : undefined ,
1717 handleClick : ( ) => { }
1818} )
1919
20- export function CarouselProvider ( { children } ) {
20+ export function PriceCarouselProvider ( { children } ) {
2121 const [ selection , setSelection ] = useState ( undefined )
2222 const [ pos , setPos ] = useState ( 0 )
2323
@@ -35,12 +35,12 @@ export function CarouselProvider ({ children }) {
3535 } , [ pos ] )
3636
3737 return (
38- < CarouselContext . Provider value = { [ selection , handleClick ] } >
38+ < PriceCarouselContext . Provider value = { [ selection , handleClick ] } >
3939 { children }
40- </ CarouselContext . Provider >
40+ </ PriceCarouselContext . Provider >
4141 )
4242}
4343
44- export function useCarousel ( ) {
45- return useContext ( CarouselContext )
44+ export function usePriceCarousel ( ) {
45+ return useContext ( PriceCarouselContext )
4646}
Original file line number Diff line number Diff line change 11import { Container , Nav , Navbar } from 'react-bootstrap'
22import styles from '../header.module.css'
33import { BackOrBrand , NavPrice , SearchItem } from './common'
4- import { CarouselProvider } from './carousel'
4+ import { PriceCarouselProvider } from './price- carousel'
55
66export default function StaticHeader ( ) {
77 return (
8- < CarouselProvider >
8+ < PriceCarouselProvider >
99 < Container as = 'header' className = 'px-sm-0' >
1010 < Navbar >
1111 < Nav
@@ -17,6 +17,6 @@ export default function StaticHeader () {
1717 </ Nav >
1818 </ Navbar >
1919 </ Container >
20- </ CarouselProvider >
20+ </ PriceCarouselProvider >
2121 )
2222}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { NORMAL_POLL_INTERVAL, SSR } from '@/lib/constants'
88import { useBlockHeight } from './block-height'
99import { useChainFee } from './chain-fee'
1010import { CompactLongCountdown } from './countdown'
11- import { useCarousel } from './nav/carousel'
11+ import { usePriceCarousel } from './nav/price- carousel'
1212
1313export const PriceContext = React . createContext ( {
1414 price : null ,
@@ -45,7 +45,7 @@ export function PriceProvider ({ price, children }) {
4545}
4646
4747export default function Price ( { className } ) {
48- const [ selection , handleClick ] = useCarousel ( )
48+ const [ selection , handleClick ] = usePriceCarousel ( )
4949
5050 const { price, fiatSymbol } = usePrice ( )
5151 const { height : blockHeight , halving } = useBlockHeight ( )
You can’t perform that action at this time.
0 commit comments