403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.145.45.170
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/cwd/plugins/give/src/EventTickets/resources/admin/components/EventDetailsPage/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/plugins/give/src/EventTickets/resources/admin/components/EventDetailsPage/index.tsx
import {useState} from 'react';
import cx from 'classnames';
import {__} from '@wordpress/i18n';
import {GiveIcon} from '@givewp/components';
import styles from './EventDetailsPage.module.scss';
import {GiveEventTicketsDetails} from './types';
import EventSection from './EventSection';
import TicketTypesSection from './TicketTypesSection';
import DonationFormsSection from './DonationFormsSection';
import AttendeesSection from './AttendeesSection';

declare global {
    interface Window {
        GiveEventTicketsDetails: GiveEventTicketsDetails;
    }
}

const tabs = {
    overview: __('Overview', 'give'),
    attendees: __('Attendees', 'give'),
};

export default function EventDetailsPage() {
    const [activeTab, setActiveTab] = useState<'overview' | 'attendees'>('overview');
    const [updateErrors, setUpdateErrors] = useState<{errors: Array<number>; successes: Array<number>}>({
        errors: [],
        successes: [],
    });

    return (
        <>
            <article className={styles.page}>
                <header className={styles.pageHeader}>
                    <div className={styles.flexRow}>
                        <GiveIcon size={'1.875rem'} />
                        <h1 className={styles.pageTitle}>{__('Event details', 'give')}</h1>
                    </div>
                    <div className={styles.flexRow}>
                        <a
                            href={`${window.GiveEventTicketsDetails.adminUrl}edit.php?post_type=give_forms&page=give-event-tickets`}
                            className={`button button-secondary ${styles.goToEventsListButton}`}
                        >
                            {__('Go to events list', 'give')}
                        </a>
                    </div>
                </header>
                <div className={cx('wp-header-end', 'hidden')} />

                <nav className={styles.tabsNav}>
                    {Object.keys(tabs).map((tab) => (
                        <button
                            key={tab}
                            className={cx(styles.tabButton, activeTab === tab && styles.activeTab)}
                            onClick={() => setActiveTab(tab as 'overview' | 'attendees')}
                        >
                            {tabs[tab]}
                        </button>
                    ))}
                </nav>

                <div className={styles.pageContent}>
                    {activeTab === 'attendees' ? (
                        <AttendeesSection />
                    ) : (
                        <>
                            <EventSection setUpdateErrors={setUpdateErrors} />
                            <TicketTypesSection />
                            <DonationFormsSection />
                        </>
                    )}
                </div>
            </article>
        </>
    );
}

Youez - 2016 - github.com/yon3zu
LinuXploit