fix(error tracking): streamline Rybbit integration by removing unnecessary type assertions
- Updated ErrorBoundary and ErrorTracking components to directly access the Rybbit object without type assertions. - Enhanced error tracking by ensuring stack traces and component stacks are only included if available. - Improved the HeroSection component by replacing the standard img tag with Next.js Image component for better performance and optimization.
This commit is contained in:
1 parent
4e14cc79ff
commit
50ffed4fee
4 files changed
+43
-10
No files matched your search
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Definições de tipos para a API do Rybbit Analytics
|
||||
* Estende a interface Window global para incluir o objeto rybbit
|
||||
*/
|
||||
|
||||
interface RybbitTrackEvent {
|
||||
message?: string;
|
||||
stack?: string | null;
|
||||
componentStack?: string | null;
|
||||
errorName?: string;
|
||||
timestamp?: string;
|
||||
type?: string;
|
||||
filename?: string | null;
|
||||
lineno?: number | null;
|
||||
colno?: number | null;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
interface Rybbit {
|
||||
track(eventName: string, data?: RybbitTrackEvent): void;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
rybbit?: Rybbit;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in new issue
Block a user