daily-code
daily-code copied to clipboard
Refactor Print component to use useRouter hook and add delay before printing
In the local environment, the print function is not working; it directly redirects to the main screen, and the print page is blank. Therefore, I added a delay, and after printing, I closed the current tab.
bhai but don't you think this could introduce some other problems? Like what if pdf took more than 1s to load?
bhai but don't you think this could introduce some other problems? Like what if pdf took more than 1s to load?
Yes, you are right for that. Now, I added an afterprint listener.
Sorry seems like there are merge conflicts
@hkirat resolved conflict
.bounty $5