Skip to content

Commit cfaccf3

Browse files
committed
fix
1 parent 903aef4 commit cfaccf3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/services/client-hints.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,23 @@ export const { getHints, getClientHintCheckScript } = getHintUtils({
1313
// add other hints here
1414
})
1515

16+
/**
17+
* @public
18+
* Utility function used to get the time zone for the current users browser on either the client or the server.
19+
* */
1620
export const getTimeZone = (request?: Request) => getHints(request).timeZone
1721

22+
/**
23+
* @public
24+
* Utility used to get the client hints for the current users browser.
25+
* */
1826
export function useHints() {
1927
const requestInfo = useRouteLoaderData<Route.ComponentProps["loaderData"]>("root")
2028
return requestInfo?.hints
2129
}
22-
30+
/**
31+
* Utility component used to check the client hints on the client and send them to the server.
32+
*/
2333
export function ClientHintCheck({ nonce }: { nonce?: string }) {
2434
const { revalidate } = useRevalidator()
2535
useEffect(() => subscribeToSchemeChange(() => revalidate()), [revalidate])

0 commit comments

Comments
 (0)