[pluginsFunctionality | DONE | REMOVED] remove FOS component, use directly the library component - fixes the back issue after click to go to search page

This commit is contained in:
argirok 2024-04-04 09:28:59 +03:00
parent e0bd40c485
commit 8f6ca702b1
4 changed files with 1 additions and 73 deletions

View File

@ -47,11 +47,7 @@ const routes: Routes = [
loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule),
data: {hasQuickContact: false}
},
{
path: 'fields-of-science',
loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule),
data: {extraOffset: 100, hasQuickContact: false}
},
{path: 'fields-of-science', loadChildren: () => import('./openaireLibrary/fos/fos.module').then(m => m.FosModule), data: {extraOffset: 100, hasQuickContact: false}},
{
path: 'organizations',
loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule),

View File

@ -1,20 +0,0 @@
import {NgModule} from "@angular/core";
import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {CommunityFosComponent} from "./fos.component";
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: CommunityFosComponent,
canActivate: [IsRouteEnabled],
canDeactivate: [PreviousRouteRecorder]
}
])
]
})
export class LibFosRoutingModule {
}

View File

@ -1,21 +0,0 @@
import {Component} from "@angular/core";
import {properties} from "../../environments/environment";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
@Component({
selector: 'community-fos',
template: `
<fos></fos>
`
})
export class CommunityFosComponent {
communityId;
constructor() {
}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
}
}

View File

@ -1,27 +0,0 @@
import {CommonModule} from "@angular/common";
import {NgModule} from "@angular/core";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {LibFosRoutingModule} from "./fos-routing.module";
import {FosRoutingModule} from "../openaireLibrary/fos/fos-routing.module";
import {FosModule} from "../openaireLibrary/fos/fos.module";
import {CommunityFosComponent} from "./fos.component";
@NgModule({
imports: [
CommonModule,
LibFosRoutingModule,
FosRoutingModule,
FosModule
],
declarations: [
CommunityFosComponent
],
exports: [
CommunityFosComponent
],
providers: [
PreviousRouteRecorder
]
})
export class LibFosModule {
}