Skip to content

Commit

Permalink
fix: check for scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Aug 24, 2023
1 parent c181974 commit cb71999
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ChatViewComponentTest = () => {
{/* <Loader show={isLoading} /> */}
<ChatViewComponentCard>

<ChatViewComponent onClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='0ff5022ef524b5eacf0bf4bdf4565d5091e022b8f353caacdb47f76bddcd0771' limit={10}/>
<ChatViewComponent onClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10}/>
</ChatViewComponentCard>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/sdk-frontend-react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const checkForWeb3Data = ({

export function App() {
const { account, library, active, chainId } = useWeb3React();
const [env, setEnv] = useState<ENV>(ENV.STAGING);
const [env, setEnv] = useState<ENV>(ENV.PROD);
const [isCAIP, setIsCAIP] = useState(false);
const [signer, setSigner] = useState();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
}, [messagesSinceLastConnection]);

const scrollToBottom = (behavior?: string | null) => {
bottomRef?.current?.scrollIntoView(
!behavior ? true : { behavior: 'smooth' }
);
bottomRef?.current?.scrollIntoView({ behavior: "smooth", block: 'end' });
};

useEffect(() => {
Expand Down Expand Up @@ -299,7 +297,7 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
!pgpPrivateKey
)
}
onScroll={() => onScroll()}
onScroll={(e) => {e.stopPropagation();onScroll()}}
>
{loading ? <Spinner color={theme.spinnerColor} /> : ''}
{!loading && (
Expand Down

0 comments on commit cb71999

Please sign in to comment.