Skip to content

Commit 8d34c7e

Browse files
committed
fix: memberId -> accountId in QuestionView
1 parent b662f70 commit 8d34c7e

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

cypress/e2e/player/main.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('player view as anonymous', () => {
2626
},
2727
{
2828
context: Context.Player,
29-
memberId: undefined,
29+
accountId: undefined,
3030
},
3131
);
3232
cy.visit(`/`);

cypress/support/commands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Cypress.Commands.add('setUpApi', (database, appContext) => {
2626
win.indexedDB.deleteDatabase('graasp-app-cypress');
2727
// eslint-disable-next-line no-param-reassign
2828
win.appContext = {
29-
memberId: CURRENT_MEMBER.id,
3029
accountId: CURRENT_MEMBER.id,
3130
itemId: MOCK_SERVER_ITEM.id,
3231
apiHost: Cypress.env('VITE_API_HOST'),

src/mocks/db.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export const defaultMockContext: LocalContext = {
4242
permission: PermissionLevel.Admin,
4343
context: Context.Builder,
4444
itemId: mockItem.id,
45-
memberId: mockMembers[0].id,
4645
accountId: mockMembers[0].id,
4746
};
4847

src/modules/question-view/QuestionView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import useUserAnswers from '../context/UserAnswersContext';
3434

3535
const QuestionView = (): JSX.Element => {
3636
const { t } = useTranslation('translations', { keyPrefix: 'QUESTION_VIEW' });
37-
const { memberId } = useLocalContext();
37+
const { accountId } = useLocalContext();
3838
const { question, general } = useSettings();
3939
const { required } = general;
4040

@@ -50,8 +50,8 @@ const QuestionView = (): JSX.Element => {
5050
const [isInit, setIsInit] = useState<boolean>(false);
5151

5252
const userAuthentified = useMemo(
53-
() => typeof memberId === 'string' && memberId.length > 0,
54-
[memberId],
53+
() => typeof accountId === 'string' && accountId.length > 0,
54+
[accountId],
5555
);
5656

5757
// Update the answer if the stored value change

0 commit comments

Comments
 (0)