Small cleanups

This commit is contained in:
Zoe Roux 2023-01-08 16:28:12 +09:00 committed by Zoe Roux
parent 4b7f59e2e9
commit a6c645c33f
2 changed files with 19 additions and 18 deletions

View File

@ -35,7 +35,7 @@ export const tooltip = (tooltip: string, up?: boolean) =>
});
export const WebTooltip = ({ theme }: { theme: Theme }) => {
const background = `${theme.colors.black}CC`;
const background = `${theme.light.colors.black}CC`;
return (
<style jsx global>{`

View File

@ -157,9 +157,12 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
>
<Pressable
focusable={false}
onPress={
Platform.OS === "web"
? (e) => {
onPress={(e) => {
// TODO: use onPress event to diferenciate touch and click on the web (requires react native web 0.19)
if (Platform.OS !== "web") {
displayControls ? setMouseMoved(false) : show();
return;
}
e.preventDefault();
touchCount++;
if (touchCount == 2) {
@ -171,9 +174,7 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
touchCount = 0;
}, 400);
setPlay(!isPlaying);
}
: () => (displayControls ? setMouseMoved(false) : show())
}
}}
{...css(StyleSheet.absoluteFillObject)}
>
<Video