auth enhancements amongst other things
This commit is contained in:
parent
bb9769e917
commit
85c3799fca
21 changed files with 336 additions and 363 deletions
|
|
@ -5,13 +5,13 @@ export default function useScroll(element: string) {
|
|||
let isScrolledToBottom: boolean;
|
||||
|
||||
// Set the initial scroll position.
|
||||
const setScroll = () => {
|
||||
const setScroll = (smooth: boolean) => {
|
||||
const view = document.getElementById(element)
|
||||
|
||||
if (view) {
|
||||
view.scrollTo({
|
||||
top: view.scrollHeight - view.clientHeight,
|
||||
behavior: 'smooth'
|
||||
behavior: (smooth) ? 'smooth' : 'auto'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue