nits
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
"android": "expo run:android",
|
||||
"compile": "tsc --noEmit",
|
||||
"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]",
|
||||
"dependencies": {
|
||||
|
||||
@@ -112,8 +112,6 @@ function PlayableMediaView({
|
||||
});
|
||||
return () => {
|
||||
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);
|
||||
setResolveError(null);
|
||||
setCurrentTime(0);
|
||||
|
||||
@@ -65,7 +65,6 @@ export function useChannel(channelId: string | null): UseChannelResult {
|
||||
client.off(channelId, 'leave', onLeave);
|
||||
client.off(channelId, 'message', onMessage);
|
||||
client.unsubscribe(channelId);
|
||||
// Clear on teardown so a new channel doesn't briefly show stale data.
|
||||
setPresence([]);
|
||||
setMessages([]);
|
||||
};
|
||||
|
||||
@@ -43,7 +43,6 @@ export function useLiveParticle(path: ParticlePath): UseLiveParticleResult {
|
||||
|
||||
return () => {
|
||||
unsubscribe();
|
||||
// Reset on teardown so a new path doesn't flash the previous particle.
|
||||
setIsLoading(true);
|
||||
setError(null);
|
||||
setParticle(null);
|
||||
@@ -112,7 +111,6 @@ export function useLiveParticleChildren(
|
||||
|
||||
return () => {
|
||||
unsubscribe();
|
||||
// Reset on teardown so a new path doesn't flash the previous children.
|
||||
setChildren([]);
|
||||
setError(null);
|
||||
setIsLoading(true);
|
||||
@@ -157,7 +155,6 @@ export function useLiveLatestChild(
|
||||
|
||||
return () => {
|
||||
unsubscribe();
|
||||
// Reset on teardown so a new path doesn't flash the previous child.
|
||||
setIsLoading(true);
|
||||
setLatestChild(null);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user