Skip to content

Commit

Permalink
fix: readd useismounted
Browse files Browse the repository at this point in the history
  • Loading branch information
nahoc committed Nov 13, 2024
1 parent 664d75e commit 44b4610
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ https://www.npmjs.com/package/@risc0/ui

| Statements | Branches | Functions | Lines |
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
| ![Statements](https://img.shields.io/badge/statements-40.69%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-79.71%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-73.8%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-40.69%25-red.svg?style=flat) |
| ![Statements](https://img.shields.io/badge/statements-40.43%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-78.57%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-72.09%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-40.43%25-red.svg?style=flat) |
13 changes: 13 additions & 0 deletions hooks/use-is-mounted.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client";

import { useEffect, useState } from "react";

export function useIsMounted() {
const [isMounted, setIsMounted] = useState<boolean>(false);

useEffect(() => {
setIsMounted(true);
}, []);

return isMounted;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risc0/ui",
"version": "0.0.214",
"version": "0.0.215",
"private": false,
"sideEffects": false,
"type": "module",
Expand Down

0 comments on commit 44b4610

Please sign in to comment.