nits
This commit is contained in:
@@ -10,7 +10,8 @@
|
|||||||
"android": "expo run:android",
|
"android": "expo run:android",
|
||||||
"compile": "tsc --noEmit",
|
"compile": "tsc --noEmit",
|
||||||
"lint": "expo lint",
|
"lint": "expo lint",
|
||||||
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\""
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
||||||
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\""
|
||||||
},
|
},
|
||||||
"packageManager": "[email protected]",
|
"packageManager": "[email protected]",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -112,8 +112,6 @@ function PlayableMediaView({
|
|||||||
});
|
});
|
||||||
return () => {
|
return () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
// Reset on teardown so the next object starts from a clean slate while
|
|
||||||
// its signed URL resolves, rather than flashing the previous video.
|
|
||||||
setSourceUri(null);
|
setSourceUri(null);
|
||||||
setResolveError(null);
|
setResolveError(null);
|
||||||
setCurrentTime(0);
|
setCurrentTime(0);
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ export function useChannel(channelId: string | null): UseChannelResult {
|
|||||||
client.off(channelId, 'leave', onLeave);
|
client.off(channelId, 'leave', onLeave);
|
||||||
client.off(channelId, 'message', onMessage);
|
client.off(channelId, 'message', onMessage);
|
||||||
client.unsubscribe(channelId);
|
client.unsubscribe(channelId);
|
||||||
// Clear on teardown so a new channel doesn't briefly show stale data.
|
|
||||||
setPresence([]);
|
setPresence([]);
|
||||||
setMessages([]);
|
setMessages([]);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ export function useLiveParticle(path: ParticlePath): UseLiveParticleResult {
|
|||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
// Reset on teardown so a new path doesn't flash the previous particle.
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
setParticle(null);
|
setParticle(null);
|
||||||
@@ -112,7 +111,6 @@ export function useLiveParticleChildren(
|
|||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
// Reset on teardown so a new path doesn't flash the previous children.
|
|
||||||
setChildren([]);
|
setChildren([]);
|
||||||
setError(null);
|
setError(null);
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
@@ -157,7 +155,6 @@ export function useLiveLatestChild(
|
|||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
// Reset on teardown so a new path doesn't flash the previous child.
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
setLatestChild(null);
|
setLatestChild(null);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user