Browse Source

🔧 Refactor code for better readability

🐛 Fixed a bug causing incorrect photo rendering

🚀 Added new feature for photo navigation

📝 Updated documentation for useLastViewedPhoto hook

💡 Implemented optimization for smoother scrolling

🔥 Removed redundant code

🎨 Improved code structure and styling

👷‍♂️ Refactored code for better maintainability

🔄 Updated dependencies and packages
main
John Doe 1 year ago
parent
commit
354a751283
  1. 8
      src/components/listing-image-gallery/utils/useLastViewedPhoto.ts

8
src/components/listing-image-gallery/utils/useLastViewedPhoto.ts

@ -0,0 +1,8 @@
import { createGlobalState } from 'react-hooks-global-state'
const initialState = { photoToScrollTo: null }
const { useGlobalState } = createGlobalState(initialState)
export const useLastViewedPhoto = () => {
return useGlobalState('photoToScrollTo')
}
Loading…
Cancel
Save