Add global links & open icon links in new tab

This commit is contained in:
Xevion
2022-12-25 23:38:30 -06:00
parent 3c16258b8e
commit 283850d8b8
3 changed files with 38 additions and 19 deletions

View File

@@ -6,6 +6,14 @@ export function classNames(...classes: (string | null | undefined)[]) {
return classes.filter(Boolean).join(" ");
}
/**
* A handler that simply calls the `stopPropagation` method on an event.
* @param event The event to prevent propagation on.
*/
export const stopPropagation = (event: Event) => {
event.stopPropagation();
};
const isClient = (): boolean => {
return typeof window !== "undefined";
}