This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef } from 'react'; | |
import { ScrollView } from 'react-native'; | |
import { Navigation } from 'react-native-navigation'; | |
const useScrollToTop = ({ | |
selectedTabIndex, | |
}: { | |
selectedTabIndex: number; | |
}): React.RefObject<ScrollView> => { | |
const scrollViewRef = useRef<ScrollView>(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTENSION btree_gist; | |
CREATE TABLE room_reservations ( | |
room_id integer, | |
reserved_at timestamptz, | |
reserved_until timestamptz, | |
canceled boolean DEFAULT false, | |
EXCLUDE USING gist ( | |
room_id WITH =, tstzrange(reserved_at, reserved_until) WITH && | |
) WHERE (not canceled) |