adding template/flow for adding in a line I was added to
This commit is contained in:
@@ -24,9 +24,6 @@ export default function LineRow({
|
|||||||
const [selectedLineId, setSelectedLineId] = useRecoilState($selectedLineId);
|
const [selectedLineId, setSelectedLineId] = useRecoilState($selectedLineId);
|
||||||
const { data: userData } = useGetUserDetails();
|
const { data: userData } = useGetUserDetails();
|
||||||
|
|
||||||
// TODO: p2 move those socket handler functions to another hook so that they don't come from the context as this will cause each line row to re-render on changes to the context state/value
|
|
||||||
const { handleUnTuneToLine } = useLineDataProvider();
|
|
||||||
|
|
||||||
// take the source of truth list of memeberIds tuned in, and see if I'm in it
|
// take the source of truth list of memeberIds tuned in, and see if I'm in it
|
||||||
const isUserTunedIn = useMemo(
|
const isUserTunedIn = useMemo(
|
||||||
() =>
|
() =>
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ function useSocketHandler(linesData: MasterLineData[]) {
|
|||||||
* initiate listeners
|
* initiate listeners
|
||||||
*/
|
*/
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
/**
|
||||||
|
* TODO: P0 : notified that someone else added me to a line they created
|
||||||
|
*/
|
||||||
|
|
||||||
// when me or anyone just initially connects to line
|
// when me or anyone just initially connects to line
|
||||||
$ws.on(
|
$ws.on(
|
||||||
ServerResponseChannels.SOMEONE_CONNECTED_TO_LINE,
|
ServerResponseChannels.SOMEONE_CONNECTED_TO_LINE,
|
||||||
|
|||||||
Reference in New Issue
Block a user