Skip to content

Commit 0fced6b

Browse files
committed
feat: pass isLogin as payload entry in saveRecording
1 parent 798c49e commit 0fced6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/molecules/SaveRecording.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const SaveRecording = ({ fileName }: SaveRecordingProps) => {
2121
const [recordingName, setRecordingName] = useState<string>(fileName);
2222
const [waitingForSave, setWaitingForSave] = useState<boolean>(false);
2323

24-
const { browserId, setBrowserId, notify, recordings } = useGlobalInfoStore();
24+
const { browserId, setBrowserId, notify, recordings, isLogin } = useGlobalInfoStore();
2525
const { socket } = useSocketStore();
2626
const { state, dispatch } = useContext(AuthContext);
2727
const { user } = state;
@@ -58,7 +58,7 @@ export const SaveRecording = ({ fileName }: SaveRecordingProps) => {
5858
// releases resources and changes the view for main page by clearing the global browserId
5959
const saveRecording = async () => {
6060
if (user) {
61-
const payload = { fileName: recordingName, userId: user.id };
61+
const payload = { fileName: recordingName, userId: user.id, isLogin: isLogin };
6262
socket?.emit('save', payload);
6363
setWaitingForSave(true);
6464
console.log(`Saving the recording as ${recordingName} for userId ${user.id}`);

0 commit comments

Comments
 (0)