mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Merge pull request #4161 from atmire/only-import-altcha-on-the-browser
Fix ssr error by only importing altcha on the client side
This commit is contained in:
@@ -86,8 +86,8 @@
|
||||
|
||||
<!-- Captcha - to be rendered only if enabled in backend requestitem.cfg -->
|
||||
@if (!!(captchaEnabled$ | async)) {
|
||||
<div *ngVar="challengeHref$ | async as href">
|
||||
<ds-altcha-captcha autoload="onload" challengeUrl="{{ href }}" (payload)="handlePayload($event)">
|
||||
<div>
|
||||
<ds-altcha-captcha autoload="onload" challengeUrl="{{ challengeHref$ | async }}" (payload)="handlePayload($event)">
|
||||
</ds-altcha-captcha>
|
||||
</div>
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
import 'altcha';
|
||||
|
||||
import {
|
||||
AsyncPipe,
|
||||
Location,
|
||||
@@ -65,7 +63,6 @@ import {
|
||||
isNotEmpty,
|
||||
} from '../../../shared/empty.util';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { VarDirective } from '../../../shared/utils/var.directive';
|
||||
import { getItemPageRoute } from '../../item-page-routing-paths';
|
||||
import { AltchaCaptchaComponent } from './altcha-captcha.component';
|
||||
|
||||
@@ -78,7 +75,6 @@ import { AltchaCaptchaComponent } from './altcha-captcha.component';
|
||||
AsyncPipe,
|
||||
ReactiveFormsModule,
|
||||
BtnDisabledDirective,
|
||||
VarDirective,
|
||||
AltchaCaptchaComponent,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
|
@@ -1,5 +1,3 @@
|
||||
import 'altcha';
|
||||
|
||||
import {
|
||||
AsyncPipe,
|
||||
Location,
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import 'altcha';
|
||||
|
||||
import {
|
||||
HttpClient,
|
||||
provideHttpClient,
|
||||
|
Reference in New Issue
Block a user