All files / apps/web/src/entry hydrate.tsx

83.33% Statements 5/6
25% Branches 1/4
100% Functions 1/1
83.33% Lines 5/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28              326x 326x               326x 326x 326x                  
/// <reference types="vite/client" />
import React from "react";
 
import * as Sentry from "@sentry/tanstackstart-react";
import { StartClient } from "@tanstack/react-start/client";
import { hydrateRoot } from "react-dom/client";
 
const sentryDsn = import.meta.env.VITE_SENTRY_DSN;
if (sentryDsn) {
	Sentry.init({
		dsn: sentryDsn,
		tracesSampleRate: 1,
		dataCollection: {},
	});
}
 
React.startTransition(() => {
	const client = <StartClient />;
	hydrateRoot(
		document,
		import.meta.env.MODE === "test" ? (
			client
		) : (
			<React.StrictMode>{client}</React.StrictMode>
		),
	);
});