MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / FeedbackButton

Function FeedbackButton

apps/start/src/components/feedback-button.tsx:5–28  ·  view source on GitHub ↗
({ className }: { className?: string })

Source from the content-addressed store, hash-verified

3import { op } from '@/utils/op';
4
5export function FeedbackButton({ className }: { className?: string }) {
6 const context = useRouteContext({ strict: false });
7 return (
8 <button
9 className={cn('justify-start text-left text-[13px]', className)}
10 onClick={() => {
11 op.track('feedback_button_clicked');
12 if ('uj' in window && window.uj !== undefined) {
13 (window as any).uj.identify({
14 id: context.session?.userId,
15 firstName: context.session?.user?.firstName,
16 email: context.session?.user?.email,
17 });
18 setTimeout(() => {
19 (window as any).uj.showWidget();
20 }, 10);
21 }
22 }}
23 type="button"
24 >
25 Give feedback
26 </button>
27 );
28}

Callers

nothing calls this directly

Calls 3

cnFunction · 0.90
trackMethod · 0.45
identifyMethod · 0.45

Tested by

no test coverage detected