mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-01 16:46:36 +08:00
refactor(frontend): extract reusable hooks and page helper modules
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { isWebViewFunc } from "@/utils/panel";
|
||||
|
||||
export const useWebViewMode = (): boolean => {
|
||||
const [isWebView, setIsWebView] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsWebView(isWebViewFunc());
|
||||
}, []);
|
||||
|
||||
return isWebView;
|
||||
};
|
||||
Reference in New Issue
Block a user