diff --git a/frontend/app/components/Session_/QueueControls/QueueControls.tsx b/frontend/app/components/Session_/QueueControls/QueueControls.tsx index f27ff6977..755982cd7 100644 --- a/frontend/app/components/Session_/QueueControls/QueueControls.tsx +++ b/frontend/app/components/Session_/QueueControls/QueueControls.tsx @@ -38,10 +38,9 @@ function QueueControls(props: Props) { const totalPages = Math.ceil(total / PER_PAGE); const index = sessionIds.indexOf(sessionId); - // check for the last page and load the next if (currentPage !== totalPages && index === sessionIds.length - 1) { - searchStore - .fetchAutoplaySessions(currentPage + 1) + sessionStore + .fetchAutoplayList(currentPage + 1) .then(setAutoplayValues); } }, []); diff --git a/frontend/app/initialize.tsx b/frontend/app/initialize.tsx index 109fa1bba..eee5fba02 100644 --- a/frontend/app/initialize.tsx +++ b/frontend/app/initialize.tsx @@ -1,4 +1,5 @@ -import './styles/index.scss'; +import './styles/index.css'; +import './styles/global.scss' import React from 'react'; import { createRoot } from 'react-dom/client'; import './init'; diff --git a/frontend/app/mstore/sessionStore.ts b/frontend/app/mstore/sessionStore.ts index 9e28710ac..c01c8ae7d 100644 --- a/frontend/app/mstore/sessionStore.ts +++ b/frontend/app/mstore/sessionStore.ts @@ -513,17 +513,17 @@ export default class SessionStore { this.totalLiveSessions = data.total } - fetchAutoplayList = async (params = {}) => { + fetchAutoplayList = async (page: number) => { try { - setSessionFilter(cleanSessionFilters(params)); - const data = await sessionService.getAutoplayList(params); - this.sessionIds = this.sessionIds - .concat(data.map((i: any) => i.sessionId + '')) - .filter((i, index) => this.sessionIds.indexOf(i) === index); + const filter = searchStore.instance.toSearch(); + setSessionFilter(cleanSessionFilters(filter)); + const data = await sessionService.getAutoplayList({ ...filter, page: page }); + const ids = data.map((i: any) => i.sessionId + '').filter((i, index) => !this.sessionIds.includes(i)); + this.sessionIds = this.sessionIds.concat(ids); } catch (e) { console.error(e); } - } + }; clearList = () => { this.list = []; diff --git a/frontend/app/styles/global.scss b/frontend/app/styles/global.scss index 34a33ec7b..52bfdd383 100644 --- a/frontend/app/styles/global.scss +++ b/frontend/app/styles/global.scss @@ -17,10 +17,8 @@ input.no-focus:focus { @apply rounded-lg shadow-sm border bg-white; } -@layer base { - img { - @apply inline-block; - } +img { + @apply inline-block; } .lucide { diff --git a/frontend/app/styles/index.scss b/frontend/app/styles/index.css similarity index 81% rename from frontend/app/styles/index.scss rename to frontend/app/styles/index.css index 1a014deb8..c475f9f46 100644 --- a/frontend/app/styles/index.scss +++ b/frontend/app/styles/index.css @@ -1,5 +1,3 @@ -@import "./theme"; -@import "./global"; @import "./reset.css"; @import "./import.css"; @import "./main.css"; diff --git a/frontend/app/styles/react-tippy-themes.scss b/frontend/app/styles/react-tippy-themes.css similarity index 100% rename from frontend/app/styles/react-tippy-themes.scss rename to frontend/app/styles/react-tippy-themes.css diff --git a/frontend/app/styles/theme.scss b/frontend/app/styles/theme.scss deleted file mode 100644 index e69de29bb..000000000