refactor(frontend): titlecard behavior changed to allow clicking anywhere to go through to title
mobile behavior remains mostly the same, except after the first click, a second click anywhere else will go through to the title.
This commit is contained in:
20
src/context/InteractionContext.tsx
Normal file
20
src/context/InteractionContext.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import useInteraction from '../hooks/useInteraction';
|
||||
|
||||
interface InteractionContextProps {
|
||||
isTouch: boolean;
|
||||
}
|
||||
|
||||
export const InteractionContext = React.createContext<InteractionContextProps>({
|
||||
isTouch: false,
|
||||
});
|
||||
|
||||
export const InteractionProvider: React.FC = ({ children }) => {
|
||||
const isTouch = useInteraction();
|
||||
|
||||
return (
|
||||
<InteractionContext.Provider value={{ isTouch }}>
|
||||
{children}
|
||||
</InteractionContext.Provider>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user