mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 15:21:48 +03:00
This autoAnimate is SO GOOD
This commit is contained in:
parent
3092a8bba1
commit
3760b52860
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import './search.css';
|
||||
|
||||
import { useAutoAnimate } from '@formkit/auto-animate/preact';
|
||||
import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { InView } from 'react-intersection-observer';
|
||||
|
@ -145,6 +146,8 @@ function Search(props) {
|
|||
},
|
||||
);
|
||||
|
||||
const [filterBarParent] = useAutoAnimate();
|
||||
|
||||
return (
|
||||
<div id="search-page" class="deck-container" ref={scrollableRef}>
|
||||
<div class="timeline-deck deck">
|
||||
|
@ -159,7 +162,10 @@ function Search(props) {
|
|||
</header>
|
||||
<main>
|
||||
{!!q && (
|
||||
<div class={`filter-bar ${uiState === 'loading' ? 'loading' : ''}`}>
|
||||
<div
|
||||
ref={filterBarParent}
|
||||
class={`filter-bar ${uiState === 'loading' ? 'loading' : ''}`}
|
||||
>
|
||||
{!!type && (
|
||||
<Link to={`/search${q ? `?q=${encodeURIComponent(q)}` : ''}`}>
|
||||
‹ All
|
||||
|
|
Loading…
Add table
Reference in a new issue