export function AppTabs()

in kotlin/app-homepage-react/client/src/app/components/AppTabs.tsx [27:53]


export function AppTabs() {
    const state = useState(initialState);

    return (
        <>
            <div className="tab-group">
                <AppTab
                    name="On behalf of the user"
                    isActive={state.activeTab.get() === ActiveTab.OnBehalfOfTheUser}
                    onClick={() => state.activeTab.set(ActiveTab.OnBehalfOfTheUser)}
                />

                <AppTab
                    name="On behalf of the app"
                    isActive={state.activeTab.get() === ActiveTab.OnBehalfOfTheApp}
                    onClick={() => state.activeTab.set(ActiveTab.OnBehalfOfTheApp)}
                />
            </div>

            {
                state.activeTab.get() === ActiveTab.OnBehalfOfTheUser
                    ? <OnBehalfOfUserTabContents/>
                    : <OnBehalfOfAppTabContents/>
            }
        </>
    );
}