-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added file upload to add modal * Add PWA manifest Added more filter options for data table Minor padding issues for jobid page * Added status update to main job table * Dynamic height for edit modal * Dynamic height for edit modal * Dynamic height for edit modal * Dynamic height for edit modal * Added stats endpoint * Added stats page Fixed extension not scrolling to top when capturing * Added alert for invalid captures Added pre-filled url to extension add page * Added remove fixed classes on screenshot Added token renewal to extension on visibility change
- Loading branch information
Showing
10 changed files
with
435 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useSyncExternalStore } from "react"; | ||
|
||
export const useVisible = () => { | ||
const visibilitySubscription = (callback: () => void) => { | ||
document.addEventListener("visibilitychange", callback); | ||
|
||
return () => { | ||
document.removeEventListener("visibilitychange", callback); | ||
}; | ||
}; | ||
|
||
const getVisibilitySnapshot = () => { | ||
return document.visibilityState; | ||
}; | ||
|
||
const visibilityState = useSyncExternalStore( | ||
visibilitySubscription, | ||
getVisibilitySnapshot | ||
); | ||
|
||
return visibilityState === "visible"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.