Skip to content

Commit b8fdf46

Browse files
committed
fix ssr error by only importing altcha on the client side
1 parent 40a313f commit b8fdf46

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ <h1 class="mb-4">{{'bitstream-request-a-copy.header' | translate}}</h1>
8686

8787
<!-- Captcha - to be rendered only if enabled in backend requestitem.cfg -->
8888
@if (!!(captchaEnabled$ | async)) {
89-
<div *ngVar="challengeHref$ | async as href">
90-
<ds-altcha-captcha autoload="onload" challengeUrl="{{ href }}" (payload)="handlePayload($event)">
89+
<div>
90+
<ds-altcha-captcha autoload="onload" challengeUrl="{{ challengeHref$ | async }}" (payload)="handlePayload($event)">
9191
</ds-altcha-captcha>
9292
</div>
9393
}

src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'altcha';
2-
31
import {
42
AsyncPipe,
53
Location,
@@ -65,7 +63,6 @@ import {
6563
isNotEmpty,
6664
} from '../../../shared/empty.util';
6765
import { NotificationsService } from '../../../shared/notifications/notifications.service';
68-
import { VarDirective } from '../../../shared/utils/var.directive';
6966
import { getItemPageRoute } from '../../item-page-routing-paths';
7067
import { AltchaCaptchaComponent } from './altcha-captcha.component';
7168

@@ -78,7 +75,6 @@ import { AltchaCaptchaComponent } from './altcha-captcha.component';
7875
AsyncPipe,
7976
ReactiveFormsModule,
8077
BtnDisabledDirective,
81-
VarDirective,
8278
AltchaCaptchaComponent,
8379
],
8480
schemas: [CUSTOM_ELEMENTS_SCHEMA],

src/app/request-copy/email-request-copy/email-request-copy.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'altcha';
2-
31
import {
42
AsyncPipe,
53
Location,

src/modules/app/browser-app.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'altcha';
2+
13
import {
24
HttpClient,
35
provideHttpClient,

0 commit comments

Comments
 (0)