Skip to content

Commit

Permalink
fix: useDevice return type (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobernardina authored Sep 6, 2024
1 parent 21052c3 commit 0f6d14c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hooks/useDevice.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useContext } from "preact/hooks";

import { SectionContext } from "../components/section.tsx";
import { Device } from "../utils/userAgent.ts";

export const useDevice = (): string => {
export const useDevice = (): Device => {
const ctx = useContext(SectionContext);

if (typeof document !== "undefined") {
Expand Down

0 comments on commit 0f6d14c

Please sign in to comment.