function update_eeg(new_eeg) {
    // trigger will depend on which page we are currently viewing
    switch (current_page) {
        case 'analysis':
            // do eeg update for analysis page
            break;
        case 'home':
            // do eeg update for home page
            break;
        case 'sleeping':
            // do eeg update for sleeping page
            break;
        case 'recommendations':
            // do eeg update for recommendations page
            break;
        default:
            throw Error('current_page variables not set and caught properly!')
    }
}
// the function triggers an update of the eeg visualization on the frontend
the function triggers an update of the eeg visualization on the frontend
the function triggers an update of the eeg visualization on the frontend
function update_eeg(new_eeg) {
    switch (current_page) {
        case 'analysis':
            break;
        case 'home':
            break;
        case 'sleeping':
            break;
        case 'recommendations':
            break;
        default:
            throw Error('current_page variables not set and caught properly!')
    }
}
function update_eeg ( new_eeg ) { switch ( current_page ) { case 'analysis' : break ; case 'home' : break ; case 'sleeping' : break ; case 'recommendations' : break ; default : throw Error ( 'current_page variables not set and caught properly!' ) } }
the function triggers an update of the eeg visualization on the frontend
the function triggers an update of the eeg visualization on the frontend
// trigger will depend on which page we are currently viewing // do eeg update for analysis page // do eeg update for home page // do eeg update for sleeping page // do eeg update for recommendations page