Skip to content

Commit a00cd7e

Browse files
committed
feat: update currentTimestamp handling to use timezone
1 parent 06f8e66 commit a00cd7e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/App.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
// import { useMemo } from 'react'
2-
// import { GarlicHubAdapter } from './adapters/GarlicHubAdapter'
3-
// import { useCMSAdapter } from './hooks/useCMSAdapter'
41
import playlistData from './assets/playlist_data.json'
52
import { useCurrentTimestamp } from './hooks/useCurrentTimestamp'
63
import { usePlaylist } from './hooks/usePlaylist'
74
import { usePlaylistCache } from './hooks/usePlaylistCache'
85
import { PlaylistRenderer } from './PlaylistRenderer'
96

107
export const App = () => {
11-
const currentTimestamp = useCurrentTimestamp()
12-
// const cmsAdapter = useMemo(
13-
// () => new GarlicHubAdapter('https://garlic-hub.com/smil-index', 5000),
14-
// []
15-
// )
16-
// const cmsData = useCMSAdapter({ adapter: cmsAdapter })
8+
const timezone = 'America/Los_Angeles'
9+
const currentTimestamp = useCurrentTimestamp(timezone)
1710
const { currentPlaylist, elapsedSinceStart } = usePlaylist(playlistData, currentTimestamp)
1811
const { isPreloaded } = usePlaylistCache(currentPlaylist)
1912

0 commit comments

Comments
 (0)