Compare commits

..

No commits in common. "6c6e240f3d2ef28f66dec35e5733d5ce465e145c" and "9e26a608e0476833c1a94d0eded84efc7931f141" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -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("لینک مشخصات و دوز دارویی محصول کپی شد");
}

View File

@ -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);