touchstudy-core 0.1.49 → 0.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,9 @@ declare type Props = {
8
8
  };
9
9
  declare const useLogin: ({ onNavigate, role, homeAcademyUrl, homeUrl, registerUrl }: Props) => {
10
10
  handleSubmit: (event: React.FormEvent<HTMLFormElement>) => Promise<void>;
11
+ handleClearAcademyDomain: () => void;
11
12
  emailError: string;
12
13
  passwordError: string;
14
+ academyDomain: string | null;
13
15
  };
14
16
  export default useLogin;
package/dist/index.js CHANGED
@@ -2118,6 +2118,11 @@ var grades_by_area = "영역별 성적";
2118
2118
  var problems_that_took_a_long_time = "시간이 오래 걸린 문제";
2119
2119
  var my_time = "나의 시간";
2120
2120
  var top_time = "상위권 시간";
2121
+ var easy_problem = "쉬운 문제";
2122
+ var trick_problem = "함정 문제";
2123
+ var differential_problem = "변별력 문제";
2124
+ var difficult_problem = "어려운 문제";
2125
+ var general_problem = "일반적인 문제";
2121
2126
  var fingerprint = "지문";
2122
2127
  var end = "종료";
2123
2128
  var ask_for_feedback = "피드백 요청하기";
@@ -2125,7 +2130,6 @@ var quit = "종료하기";
2125
2130
  var chosen = "정답";
2126
2131
  var sign_in_with_your_google_account = "Google 계정으로 로그인";
2127
2132
  var it_will_be_generated_automatically_if_not_provided = "제공되지 않으면 자동으로 생성됩니다";
2128
- var go_back = "돌아가기";
2129
2133
  var academy_not_found = "아카데미를 찾을 수 없습니다";
2130
2134
  var full_notice = "전체 공";
2131
2135
  var academy_notice = "학원 공지";
@@ -2149,6 +2153,7 @@ var registration = "등록하기";
2149
2153
  var you_can_only_select_the_10_most_recent_exams = "최근 시험 10개만 선택 가능합니다.";
2150
2154
  var ask_a_question = "문제 질문하기";
2151
2155
  var request_a_consultation = "상담 요청하기";
2156
+ var go_back = "돌아가기";
2152
2157
  var next = "다음";
2153
2158
  var complete_processing = "완료 처리";
2154
2159
  var creation_date = "생성 날짜";
@@ -2530,6 +2535,11 @@ var lang_ko = {
2530
2535
  problems_that_took_a_long_time: problems_that_took_a_long_time,
2531
2536
  my_time: my_time,
2532
2537
  top_time: top_time,
2538
+ easy_problem: easy_problem,
2539
+ trick_problem: trick_problem,
2540
+ differential_problem: differential_problem,
2541
+ difficult_problem: difficult_problem,
2542
+ general_problem: general_problem,
2533
2543
  fingerprint: fingerprint,
2534
2544
  end: end,
2535
2545
  ask_for_feedback: ask_for_feedback,
@@ -2537,7 +2547,6 @@ var lang_ko = {
2537
2547
  chosen: chosen,
2538
2548
  sign_in_with_your_google_account: sign_in_with_your_google_account,
2539
2549
  it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided,
2540
- go_back: go_back,
2541
2550
  academy_not_found: academy_not_found,
2542
2551
  full_notice: full_notice,
2543
2552
  academy_notice: academy_notice,
@@ -2563,6 +2572,7 @@ var lang_ko = {
2563
2572
  you_can_only_select_the_10_most_recent_exams: you_can_only_select_the_10_most_recent_exams,
2564
2573
  ask_a_question: ask_a_question,
2565
2574
  request_a_consultation: request_a_consultation,
2575
+ go_back: go_back,
2566
2576
  next: next,
2567
2577
  "i'm_waiting_for_the_teacher_to_start_the_test": "선생님의 시험 시작을 기다리고 있습니다...",
2568
2578
  complete_processing: complete_processing,
@@ -2992,11 +3002,11 @@ var grades_by_area$1 = "Grades by area";
2992
3002
  var problems_that_took_a_long_time$1 = "Problems that took a long time";
2993
3003
  var my_time$1 = "My time";
2994
3004
  var top_time$1 = "Top time";
2995
- var easy_problem = "Easy problem";
2996
- var trick_problem = "Trick problem";
2997
- var differential_problem = "Differential problem";
2998
- var difficult_problem = "Difficult problem";
2999
- var general_problem = "General problem";
3005
+ var easy_problem$1 = "Easy problem";
3006
+ var trick_problem$1 = "Trick problem";
3007
+ var differential_problem$1 = "Differential problem";
3008
+ var difficult_problem$1 = "Difficult problem";
3009
+ var general_problem$1 = "General problem";
3000
3010
  var fingerprint$1 = "Fingerprint";
3001
3011
  var end$1 = "end";
3002
3012
  var ask_for_feedback$1 = "Ask for feedback";
@@ -3004,7 +3014,6 @@ var quit$1 = "Quit";
3004
3014
  var chosen$1 = "Answer";
3005
3015
  var sign_in_with_your_google_account$1 = "Sign in with your Google Account";
3006
3016
  var it_will_be_generated_automatically_if_not_provided$1 = "It will be generated automatically if not provided";
3007
- var go_back$1 = "Go back";
3008
3017
  var academy_not_found$1 = "Academy not found";
3009
3018
  var full_notice$1 = "Full notice";
3010
3019
  var academy_notice$1 = "Academy Notice";
@@ -3028,6 +3037,7 @@ var registration$1 = "Registration";
3028
3037
  var you_can_only_select_the_10_most_recent_exams$1 = "You can only select the 10 most recent exams.";
3029
3038
  var ask_a_question$1 = "Ask a question";
3030
3039
  var request_a_consultation$1 = "Request a consultation";
3040
+ var go_back$1 = "Go back";
3031
3041
  var next$1 = "Next";
3032
3042
  var complete_processing$1 = "Complete processing";
3033
3043
  var creation_date$1 = "Creation date";
@@ -3443,11 +3453,11 @@ var lang_en = {
3443
3453
  problems_that_took_a_long_time: problems_that_took_a_long_time$1,
3444
3454
  my_time: my_time$1,
3445
3455
  top_time: top_time$1,
3446
- easy_problem: easy_problem,
3447
- trick_problem: trick_problem,
3448
- differential_problem: differential_problem,
3449
- difficult_problem: difficult_problem,
3450
- general_problem: general_problem,
3456
+ easy_problem: easy_problem$1,
3457
+ trick_problem: trick_problem$1,
3458
+ differential_problem: differential_problem$1,
3459
+ difficult_problem: difficult_problem$1,
3460
+ general_problem: general_problem$1,
3451
3461
  fingerprint: fingerprint$1,
3452
3462
  end: end$1,
3453
3463
  ask_for_feedback: ask_for_feedback$1,
@@ -3455,7 +3465,6 @@ var lang_en = {
3455
3465
  chosen: chosen$1,
3456
3466
  sign_in_with_your_google_account: sign_in_with_your_google_account$1,
3457
3467
  it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided$1,
3458
- go_back: go_back$1,
3459
3468
  academy_not_found: academy_not_found$1,
3460
3469
  full_notice: full_notice$1,
3461
3470
  academy_notice: academy_notice$1,
@@ -3481,6 +3490,7 @@ var lang_en = {
3481
3490
  you_can_only_select_the_10_most_recent_exams: you_can_only_select_the_10_most_recent_exams$1,
3482
3491
  ask_a_question: ask_a_question$1,
3483
3492
  request_a_consultation: request_a_consultation$1,
3493
+ go_back: go_back$1,
3484
3494
  next: next$1,
3485
3495
  "i'm_waiting_for_the_teacher_to_start_the_test": "I'm waiting for the teacher to start the test...",
3486
3496
  complete_processing: complete_processing$1,
@@ -12221,7 +12231,7 @@ var CompareGrass = function CompareGrass(_ref) {
12221
12231
  style: {
12222
12232
  border: "1px solid #FF0000"
12223
12233
  }
12224
- }, t("Difficult_problem")));
12234
+ }, t("difficult_problem")));
12225
12235
  }))));
12226
12236
  });
12227
12237
  };
@@ -13379,6 +13389,10 @@ var useLogin$2 = function useLogin(_ref) {
13379
13389
  var searchParams = new URLSearchParams(window.location.search);
13380
13390
  var paramDomain = searchParams.get('domain');
13381
13391
  var academyDomain = paramDomain || getAcademyDomain();
13392
+ var handleClearAcademyDomain = function handleClearAcademyDomain() {
13393
+ localStorage.removeItem(ACADEMY_DOMAIN);
13394
+ onNavigate("/login-with-account");
13395
+ };
13382
13396
  var handleValidateForm = function handleValidateForm(_ref2) {
13383
13397
  var email = _ref2.email,
13384
13398
  password = _ref2.password;
@@ -13452,8 +13466,10 @@ var useLogin$2 = function useLogin(_ref) {
13452
13466
  }, []);
13453
13467
  return {
13454
13468
  handleSubmit: handleSubmit,
13469
+ handleClearAcademyDomain: handleClearAcademyDomain,
13455
13470
  emailError: emailError,
13456
- passwordError: passwordError
13471
+ passwordError: passwordError,
13472
+ academyDomain: academyDomain
13457
13473
  };
13458
13474
  };
13459
13475
 
@@ -13474,8 +13490,10 @@ function SignIn(_ref) {
13474
13490
  registerUrl: registerUrl
13475
13491
  }),
13476
13492
  handleSubmit = _useLoginWithPassword.handleSubmit,
13493
+ handleClearAcademyDomain = _useLoginWithPassword.handleClearAcademyDomain,
13477
13494
  emailError = _useLoginWithPassword.emailError,
13478
- passwordError = _useLoginWithPassword.passwordError;
13495
+ passwordError = _useLoginWithPassword.passwordError,
13496
+ academyDomain = _useLoginWithPassword.academyDomain;
13479
13497
  return React.createElement(Grid, {
13480
13498
  container: true,
13481
13499
  justifyContent: "center",
@@ -13505,7 +13523,20 @@ function SignIn(_ref) {
13505
13523
  }), React.createElement(Typography, {
13506
13524
  component: "h1",
13507
13525
  variant: "h5"
13508
- }, t("sign_in")), React.createElement(Box, {
13526
+ }, t("sign_in")), !!academyDomain && React.createElement(Typography, {
13527
+ sx: {
13528
+ color: styles.dark,
13529
+ mt: 1
13530
+ }
13531
+ }, academyDomain, React.createElement(material.IconButton, {
13532
+ sx: {
13533
+ ml: "2px",
13534
+ p: "8px"
13535
+ },
13536
+ onClick: handleClearAcademyDomain
13537
+ }, React.createElement(fa.FaTimes, {
13538
+ size: 12
13539
+ }))), React.createElement(Box, {
13509
13540
  noValidate: true,
13510
13541
  component: "form",
13511
13542
  onSubmit: handleSubmit,