A
Anonymous

Referral System - Copy this React, Tailwind Component to your project

src/hooks/useMessageHandler.ts:2:10 - error TS2305: Module '"@/lib/utils"' has no exported member 'validateMessageOrigin'. 2 import { validateMessageOrigin } from '@/lib/utils'; ~~~~~~~~~~~~~~~~~~~~~ src/lib/api/auth.ts:11:9 - error TS18046: 'response' is of type 'unknown'. 11 if (response.data.token) { ~~~~~~~~ src/lib/api/auth.ts:12:37 - error TS18046: 'response' is of type 'unknown'. 12 localStorage.setItem('token', response.data.token); ~~~~~~~~ src/lib/api/auth.ts:13:58 - error TS18046: 'response' is of type 'unknown'. 13 localStorage.setItem('currentUser', JSON.stringify(response.data.user)); ~~~~~~~~ src/lib/api/auth.ts:16:12 - error TS18046: 'response' is of type 'unknown'. 16 return response.data; ~~~~~~~~ src/lib/api/auth.ts:37:12 - error TS18046: 'response' is of type 'unknown'. 37 return response.data; ~~~~~~~~ src/lib/api/operations.ts:6:10 - error TS18046: 'response' is of type 'unknown'. 6 return response.data; ~~~~~~~~ src/lib/api/operations.ts:11:10 - error TS18046: 'response' is of type 'unknown'. 11 return response.data; ~~~~~~~~ src/lib/api/operations.ts:16:10 - error TS18046: 'response' is of type 'unknown'. 16 return response.data; ~~~~~~~~ src/lib/api/operations.ts:21:10 - error TS18046: 'response' is of type 'unknown'. 21 return response.data; ~~~~~~~~ src/lib/api/operations.ts:26:10 - error TS18046: 'response' is of type 'unknown'. 26 return response.data; ~~~~~~~~ src/lib/api/vehicles.ts:6:10 - error TS18046: 'response' is of type 'unknown'. 6 return response.data; ~~~~~~~~ src/lib/api/vehicles.ts:11:10 - error TS18046: 'response' is of type 'unknown'. 11 return response.data; ~~~~~~~~ src/lib/api/vehicles.ts:16:10 - error TS18046: 'response' is of type 'unknown'. 16 return response.data; ~~~~~~~~ src/lib/api/vehicles.ts:21:10 - error TS18046: 'response' is of type 'unknown'. 21 return response.data; ~~~~~~~~ src/lib/api/vehicles.ts:25:30 - error TS2339: Property 'patch' does not exist on type '{ get: <T>(endpoint: string, options?: RequestOptions | undefined) => Promise<T>; post: <T>(endpoint: string, data: any, options?: RequestOptions | undefined) => Promise<...>; put: <T>(endpoint: string, data: any, options?: RequestOptions | undefined) => Promise<...>; delete: <T>(endpoint: string, options?: RequestO...'. 25 const response = await api.patch(`/vehicles/${plate}/status`, { status }); ~~~~~ src/lib/messaging.ts:125:3 - error TS2559: Type 'string' has no properties in common with type 'WindowPostMessageOptions'. 125 event.origin as string // Força a interpretação de event.origin como uma string ~~~~~~~~~~~~~~~~~~~~~~ Found 17 errors in 5 files.

Prompt
Component Preview

About

ReferralSystem - Gamify referrals with points, badges, and exclusive rewards to encourage user engagement. Built with React and Tailwi. Get code instantly!

Share

Last updated 1 month ago