Closed hatemhosny closed 10 months ago
Hello @hatemhosny, currently Badeel modifies the URL which allows you to copy it and share it with anyone to end up with the same result. Does this make sense to your Feature Request? Would you require a UI modification for it?
Hi @KL13NT
Currently search query is persisted in URL e.g. https://badeel-masr.netlify.app/?query=%D8%A8%D9%8A%D8%A8%D8%B3%D9%8A&page=1&sort=accuracy
However, I would expect to be able to share a specific product e.g. in the modal of: عرض التفاصيل, I would like to have a share link that would take me to this specific product.
Hello Hatem, this feature is now implemented. You can now find a "شارك المنتج" button in every product modal. Feel free to provide feedback on this. Thank you!
Resolved in ac605a9
Nice work 👍
We can make this even better using Web Share API to show the OS share screen e.g. WhatsApp, Messenger, Copy URL, ...etc.
This is a sample code
const shareData = {
title: "Product 1",
text: "Check Product 1 on Badeel!",
url: shareUrl,
};
// check that share is supported by OS/browser and the data is valid
if (navigator.canShare && navigator.canShare(shareData)) {
navigator.share(shareData);
} else {
// copy URL to clipboard as we do now
}
Nice suggestion! Done, mobile devices use the Web Share API now. Thank you!
Allow users to share specific product status by URL.