Compare commits
No commits in common. "6c6e240f3d2ef28f66dec35e5733d5ce465e145c" and "9e26a608e0476833c1a94d0eded84efc7931f141" have entirely different histories.
6c6e240f3d
...
9e26a608e0
@ -197,7 +197,7 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() => {
|
||||
if (typeof window !== 'undefined' && navigator.clipboard) {
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(window.location.href);
|
||||
toast.success("لینک مشخصات و دوز دارویی محصول کپی شد");
|
||||
}
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export function useNetworkStatus() {
|
||||
const [isOnline, setIsOnline] = useState(true);
|
||||
const [isOnline, setIsOnline] = useState(navigator.onLine);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {
|
||||
setIsOnline(navigator.onLine);
|
||||
}
|
||||
|
||||
const handleOnline = () => setIsOnline(true);
|
||||
const handleOffline = () => setIsOnline(false);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user