renamed search component to search-page
This commit is contained in:
1 parent
ca7e3fa489
commit
728dae4e59
8 files changed
+30
-30
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { HomeComponent } from './features/home/home.component';
|
||||
import { SearchComponent } from './features/discover/search/search.component';
|
||||
import { SearchPageComponent } from './features/discover/search-page/search-page.component';
|
||||
import { TrendingComponent } from './features/discover/trending/trending.component';
|
||||
import { PopularComponent } from './features/discover/popular/popular.component';
|
||||
import { LibraryComponent } from './features/library/library.component';
|
||||
@@ -12,7 +12,7 @@ import { SettingsComponent } from './features/settings/settings.component';
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||
{ path: 'home', component: HomeComponent },
|
||||
{ path: 'search', component: SearchComponent },
|
||||
{ path: 'search', component: SearchPageComponent },
|
||||
{ path: 'popular', component: PopularComponent },
|
||||
{ path: 'trending', component: TrendingComponent },
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { CommonModule, DatePipe } from '@angular/common';
|
||||
import { HomeComponent } from './features/home/home.component';
|
||||
import { PopularComponent } from './features/discover/popular/popular.component';
|
||||
import { TrendingComponent } from './features/discover/trending/trending.component';
|
||||
import { SearchComponent } from './features/discover/search/search.component';
|
||||
import { SearchPageComponent } from './features/discover/search-page/search-page.component';
|
||||
import { LibraryComponent } from './features/library/library.component';
|
||||
|
||||
import { DynamicEntryListComponent } from './shared/components/lists/dynamic-entry-list/dynamic-entry-list.component';
|
||||
@@ -53,7 +53,7 @@ import { ToastrModule } from 'ngx-toastr';
|
||||
HomeComponent,
|
||||
PopularComponent,
|
||||
TrendingComponent,
|
||||
SearchComponent,
|
||||
SearchPageComponent,
|
||||
LibraryComponent,
|
||||
FavoritComponent,
|
||||
WatchlistComponent,
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,21 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SearchPageComponent } from './search-page.component';
|
||||
|
||||
describe('SearchPageComponent', () => {
|
||||
let component: SearchPageComponent;
|
||||
let fixture: ComponentFixture<SearchPageComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [SearchPageComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(SearchPageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+4
-4
@@ -5,11 +5,11 @@ import { FormControl } from '@angular/forms';
|
||||
import { debounceTime, distinctUntilChanged } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-search',
|
||||
templateUrl: './search.component.html',
|
||||
styleUrls: ['./search.component.css'],
|
||||
selector: 'app-search-page',
|
||||
templateUrl: './search-page.component.html',
|
||||
styleUrls: ['./search-page.component.css'],
|
||||
})
|
||||
export class SearchComponent implements OnInit {
|
||||
export class SearchPageComponent implements OnInit {
|
||||
entryType: boolean = true;
|
||||
entries: Entry[] = [];
|
||||
isSearchLocked: boolean = false;
|
||||
@@ -1,21 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SearchComponent } from './search.component';
|
||||
|
||||
describe('SearchComponent', () => {
|
||||
let component: SearchComponent;
|
||||
let fixture: ComponentFixture<SearchComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [SearchComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(SearchComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -43,7 +43,7 @@ export class SeenModalComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.data.watchDate == null) {
|
||||
if (!this.data || !this.data.watchDate) {
|
||||
// ? no initial data was passed: populate date field with current date
|
||||
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user