export const openLink = (url: string, filename: string | undefined = undefined) => {
	const link = document.createElement("a");
	link.href = url;
	link.download = filename || "";

	document.body.appendChild(link);
	link.click();

	setTimeout(() => {
		document.body.removeChild(link);
		URL.revokeObjectURL(url);
	}, 100);
};