* feat: add mobile navigation with responsive layout and theme controls * feat: prevent workspace owners from removing themselves and update workspace dropdown styling * feat: add useClickOutside hook and event listener utilities for improved UI interactions * chore: improve mobile UI styling * refactor: improve UI layout and buttons in boards/members views feat: adjust /members layout * fix: standardize layout containers and improve mobile navigation styling * feat: update card view layout * feat: add responsive layout to board view * feat: readjust boards page layout * feat: enhance table view on mobile for members page * feat: extend mobile support with sliding side panels * fix: prevent two panels from being open at the same time * feat: close panels when clicking outside * fix: adjust font-sizing for import source --------- Co-authored-by: Henry <henry_ball@hotmail.co.uk>
16 lines
615 B
TypeScript
16 lines
615 B
TypeScript
import { useEffect, useLayoutEffect } from "react";
|
|
|
|
/**
|
|
* Custom hook that uses either `useLayoutEffect` or `useEffect` based on the environment (client-side or server-side).
|
|
* @param {Function} effect - The effect function to be executed.
|
|
* @param {Array<any>} [dependencies] - An array of dependencies for the effect (optional).
|
|
* @example
|
|
* ```tsx
|
|
* useIsomorphicLayoutEffect(() => {
|
|
* // Code to be executed during the layout phase on the client side
|
|
* }, [dependency1, dependency2]);
|
|
* ```
|
|
*/
|
|
export const useIsomorphicLayoutEffect =
|
|
typeof window !== "undefined" ? useLayoutEffect : useEffect;
|