midv
This commit is contained in:
		@@ -1,13 +1,12 @@
 | 
			
		||||
// Root.jsx
 | 
			
		||||
import { React, useContext, useState, useEffect } from 'react';
 | 
			
		||||
import { toast } from 'react-toastify';
 | 
			
		||||
import { API_URL } from '../config';
 | 
			
		||||
import { Player } from './AudioPlayer.jsx';
 | 
			
		||||
import { JoyUIRootIsland } from './Components.jsx';
 | 
			
		||||
import { PrimeReactProvider } from "primereact/api";
 | 
			
		||||
import Alert from '@mui/joy/Alert';
 | 
			
		||||
import WarningIcon from '@mui/icons-material/Warning';
 | 
			
		||||
import {JoyUIRootIsland} from './Components.jsx';
 | 
			
		||||
import CustomToastContainer from '../components/ToastProvider.jsx';
 | 
			
		||||
import { PrimeReactProvider } from "primereact/api";
 | 
			
		||||
import { API_URL } from "../config";
 | 
			
		||||
import { Player } from "./AudioPlayer.jsx";
 | 
			
		||||
import LyricSearch from './LyricSearch.jsx';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -113,7 +113,7 @@ export function LyricSearchInputField(opts = {}) {
 | 
			
		||||
    $('#spinner').removeClass("hidden");
 | 
			
		||||
    $(box).addClass("hidden");
 | 
			
		||||
    //setTimeout(() => { $("#spinner").addClass("hidden"); alert('Not yet implemented.')}, 1000);
 | 
			
		||||
    search_toast = toast.info("Searching...");
 | 
			
		||||
    search_toast = toast.info("Searching...", {style: { color: '#000000', backgroundColor: 'rgba(217, 242, 255, 0.8)'}});
 | 
			
		||||
    start_time = new Date().getTime()
 | 
			
		||||
    $.ajax({
 | 
			
		||||
      url: API_URL+'/lyric/search',
 | 
			
		||||
@@ -183,14 +183,6 @@ export function LyricSearchInputField(opts = {}) {
 | 
			
		||||
        return setSuggestions(json);
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
    // Fetch data from your API using the event.query (user's input)
 | 
			
		||||
    // axios.get(`your-api-endpoint?query=${event.query}`)
 | 
			
		||||
    //     .then(response => {
 | 
			
		||||
      //         setSuggestions(response.data); // Update suggestions state with the fetched data
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(error => {
 | 
			
		||||
      //         console.error('Error fetching suggestions:', error);
 | 
			
		||||
    //     });
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
@@ -237,7 +229,7 @@ export const UICheckbox = forwardRef(function UICheckbox(opts = {}, ref) {
 | 
			
		||||
  let valid_exclusions = true;
 | 
			
		||||
  useImperativeHandle(ref, () => ({
 | 
			
		||||
    setChecked: (val) => setChecked(val),
 | 
			
		||||
    checked, // (optional) expose value for reading too
 | 
			
		||||
    checked,
 | 
			
		||||
  }));
 | 
			
		||||
  
 | 
			
		||||
  const verifyExclusions = (e) => {
 | 
			
		||||
@@ -253,7 +245,6 @@ export const UICheckbox = forwardRef(function UICheckbox(opts = {}, ref) {
 | 
			
		||||
        );
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
  };
 | 
			
		||||
  return ( 
 | 
			
		||||
    <div> 
 | 
			
		||||
@@ -275,6 +266,6 @@ export const UICheckbox = forwardRef(function UICheckbox(opts = {}, ref) {
 | 
			
		||||
 | 
			
		||||
export function LyricResultBox(opts={}) {
 | 
			
		||||
  return (
 | 
			
		||||
    <Box className={`lyrics-card lyrics-card-${theme} hidden`} sx={{p: 2 }}></Box>
 | 
			
		||||
    <Box className={`lyrics-card lyrics-card-${theme} hidden`} sx={{ p: 2 }}></Box>
 | 
			
		||||
  )
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user