Skip to content

Commit

Permalink
fix: rename components
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoyooor committed Feb 23, 2024
1 parent 0e6b8aa commit 0a5793d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions apps/mobile/src/components/home/Streak.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { useMobileTheme } from '~/hooks'
import { useMobilePersistStore } from '~/store/persist'

import AnimatedPressable from '../ui/AnimatedPressable'
import { HorizantalSlider } from '../ui/HorizantalSlider'
import { HorizontalSlider } from '../ui/HorizontalSlider'

const BORDER_RADIUS = 10

Expand Down Expand Up @@ -291,7 +291,7 @@ const Streak = () => {
size={20}
/>
</AnimatedPressable>
<HorizantalSlider
<HorizontalSlider
data={publications?.slice(0, 7)}
renderItem={renderItem}
decelerationRate="normal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Props<T> = Pick<
'data' | 'renderItem' | 'snapToAlignment' | 'decelerationRate'
>

export function HorizantalSlider<T>({
export function HorizontalSlider<T>({
data,
snapToAlignment = 'start',
decelerationRate = 'fast',
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/Common/CategoryFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { tw } from '@tape.xyz/browser'
import { CREATOR_VIDEO_CATEGORIES } from '@tape.xyz/constants'
import { EVENTS, Tower } from '@tape.xyz/generic'
import type { FC } from 'react'
import React, { useRef } from 'react'
import { useRef } from 'react'

import HorizantalScroller from './HorizantalScroller'
import HorizontalScroller from './HorizontalScroller'

type Props = {
heading?: string
Expand All @@ -22,7 +22,7 @@ const CategoryFilters: FC<Props> = ({ heading }) => {

return (
<div className="sticky top-0 z-[9] bg-white dark:bg-black">
<HorizantalScroller
<HorizontalScroller
sectionRef={sectionRef}
heading={heading ?? 'Explore'}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { ChevronLeftOutline, ChevronRightOutline } from '@tape.xyz/ui'
import type { FC, RefObject } from 'react'
import React from 'react'

type Props = {
heading: string
sectionRef: RefObject<HTMLDivElement>
}

const HorizantalScroller: FC<Props> = ({ heading, sectionRef }) => {
const HorizontalScroller: FC<Props> = ({ heading, sectionRef }) => {
const sectionOffsetWidth = sectionRef.current?.offsetWidth ?? 1000
const scrollOffset = sectionOffsetWidth / 1.2

Expand Down Expand Up @@ -42,4 +41,4 @@ const HorizantalScroller: FC<Props> = ({ heading, sectionRef }) => {
)
}

export default HorizantalScroller
export default HorizontalScroller
6 changes: 3 additions & 3 deletions apps/web/src/components/Home/TopSection.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import HorizantalScroller from '@components/Common/HorizantalScroller'
import HorizontalScroller from '@components/Common/HorizontalScroller'
import useProfileStore from '@lib/store/idb/profile'
import React, { useRef } from 'react'
import { useRef } from 'react'

import GitcoinAlert from './GitcoinAlert'
import LatestBytes from './LatestBytes'
Expand All @@ -13,7 +13,7 @@ const TopSection = () => {

return (
<div className="flex flex-col">
<HorizantalScroller sectionRef={sectionRef} heading="New & Trending" />
<HorizontalScroller sectionRef={sectionRef} heading="New & Trending" />
<div
ref={sectionRef}
className="no-scrollbar laptop:pt-6 relative flex items-start space-x-4 overflow-x-auto overflow-y-hidden scroll-smooth pt-4"
Expand Down

0 comments on commit 0a5793d

Please sign in to comment.