@@ -11,16 +11,16 @@ import {
1111} from "react-router" ;
1212import { useEffect , useState } from "react" ;
1313
14- import type { Route } from "./+types/root" ;
1514import "./app.css" ;
1615import { Toaster } from "./components/ui/sonner" ;
1716import { ThemeProvider } from "./components/ui/ThemeProvider" ;
1817import { auth } from "~/lib/auth.server" ;
1918import { Navbar } from "~/components/ui/Navbar" ;
2019import { MarketingFooter } from "~/components/ui/MarketingFooter" ;
20+ import type { User } from "better-auth" ;
2121
2222
23- export const links : Route . LinksFunction = ( ) => [
23+ export const links = ( ) => [
2424 { rel : "icon" , href : "/favicon.png" } ,
2525 { rel : "preconnect" , href : "https://fonts.googleapis.com" } ,
2626 {
@@ -34,7 +34,7 @@ export const links: Route.LinksFunction = () => [
3434 } ,
3535] ;
3636
37- export async function loader ( { request } : Route . LoaderArgs ) {
37+ export async function loader ( { request } : { request : Request } ) {
3838 try {
3939 // @ts -ignore
4040 const session = await auth . api ?. getSession ?.( { headers : request . headers } ) ;
@@ -68,7 +68,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
6868}
6969
7070export default function App ( ) {
71- const data = useLoaderData < typeof loader > ( ) as { user : any } ;
71+ const data = useLoaderData < typeof loader > ( ) as { user : User } ;
7272 const location = useLocation ( ) ;
7373 const matches = useMatches ( ) ;
7474 const [ showBrand , setShowBrand ] = useState ( true ) ;
@@ -114,7 +114,7 @@ export default function App() {
114114 ) ;
115115}
116116
117- export function ErrorBoundary ( { error } : Route . ErrorBoundaryProps ) {
117+ export function ErrorBoundary ( { error } : { error : Error } ) {
118118 let message = "Oops!" ;
119119 let details = "An unexpected error occurred." ;
120120 let stack : string | undefined ;
0 commit comments