@kiwicom/smart-faq
Version:
37 lines (31 loc) • 837 B
JavaScript
// @flow strict
import * as React from 'react';
import LogMount from '@kiwicom/nitro/lib/components/LogMount';
import type { Props as EventProps } from '@kiwicom/nitro/lib/records/Event';
import LogUnmount from './LogUnmount';
import { defaultDestinations } from '../../../const/events';
type Props = {|
subCategory: string,
actionMount: string,
actionUnmount: string,
props?: EventProps,
|};
const LogLifecycle = (props: Props) => (
<>
<LogMount
event={{
category: 'SmartFAQ',
subCategory: props.subCategory,
action: props.actionMount,
destinations: defaultDestinations,
}}
props={props.props || {}}
/>
<LogUnmount
subCategory={props.subCategory}
action={props.actionUnmount}
props={props.props}
/>
</>
);
export default LogLifecycle;