Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinLiquid authored May 16, 2024
1 parent 7e87cb3 commit 3e5e3a1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'material-symbols'

import HTML from '@datkat21/html'
import { SpotifyApi } from '@spotify/web-api-ts-sdk'
import localforage from 'localforage'
import { registerSW } from 'virtual:pwa-register'

declare global {
Expand All @@ -32,16 +31,6 @@ const updateSW = registerSW({

window.onload = async () => { await updateSW() }

// Set localForage drivers
try {
await localforage.setDriver([
localforage.INDEXEDDB,
localforage.LOCALSTORAGE
])
} catch (e) {
console.error('Failed to set localForage driver:', e)
}

const auth = (): SpotifyApi => SpotifyApi.withUserAuthorization(
import.meta.env.VITE_SPOTIFY_CLIENT_ID,
window.location.origin + window.location.pathname,
Expand All @@ -68,7 +57,7 @@ window.onload = async () => {
const queue = new Queue.default()

const Player = await import('./player')
const player = new Player.default(sdk, localforage, queue)
const player = new Player.default(sdk, queue)

Check failure on line 60 in src/main.ts

View workflow job for this annotation

GitHub Actions / deploy

Expected 3 arguments, but got 2.

const Visualizer = await import('./visualizer')
// eslint-disable-next-line no-new
Expand Down

0 comments on commit 3e5e3a1

Please sign in to comment.