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 { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { HomeComponent } from './features/home/home.component';
|
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 { TrendingComponent } from './features/discover/trending/trending.component';
|
||||||
import { PopularComponent } from './features/discover/popular/popular.component';
|
import { PopularComponent } from './features/discover/popular/popular.component';
|
||||||
import { LibraryComponent } from './features/library/library.component';
|
import { LibraryComponent } from './features/library/library.component';
|
||||||
@@ -12,7 +12,7 @@ import { SettingsComponent } from './features/settings/settings.component';
|
|||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||||
{ path: 'home', component: HomeComponent },
|
{ path: 'home', component: HomeComponent },
|
||||||
{ path: 'search', component: SearchComponent },
|
{ path: 'search', component: SearchPageComponent },
|
||||||
{ path: 'popular', component: PopularComponent },
|
{ path: 'popular', component: PopularComponent },
|
||||||
{ path: 'trending', component: TrendingComponent },
|
{ path: 'trending', component: TrendingComponent },
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { CommonModule, DatePipe } from '@angular/common';
|
|||||||
import { HomeComponent } from './features/home/home.component';
|
import { HomeComponent } from './features/home/home.component';
|
||||||
import { PopularComponent } from './features/discover/popular/popular.component';
|
import { PopularComponent } from './features/discover/popular/popular.component';
|
||||||
import { TrendingComponent } from './features/discover/trending/trending.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 { LibraryComponent } from './features/library/library.component';
|
||||||
|
|
||||||
import { DynamicEntryListComponent } from './shared/components/lists/dynamic-entry-list/dynamic-entry-list.component';
|
import { DynamicEntryListComponent } from './shared/components/lists/dynamic-entry-list/dynamic-entry-list.component';
|
||||||
@@ -53,7 +53,7 @@ import { ToastrModule } from 'ngx-toastr';
|
|||||||
HomeComponent,
|
HomeComponent,
|
||||||
PopularComponent,
|
PopularComponent,
|
||||||
TrendingComponent,
|
TrendingComponent,
|
||||||
SearchComponent,
|
SearchPageComponent,
|
||||||
LibraryComponent,
|
LibraryComponent,
|
||||||
FavoritComponent,
|
FavoritComponent,
|
||||||
WatchlistComponent,
|
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';
|
import { debounceTime, distinctUntilChanged } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-search',
|
selector: 'app-search-page',
|
||||||
templateUrl: './search.component.html',
|
templateUrl: './search-page.component.html',
|
||||||
styleUrls: ['./search.component.css'],
|
styleUrls: ['./search-page.component.css'],
|
||||||
})
|
})
|
||||||
export class SearchComponent implements OnInit {
|
export class SearchPageComponent implements OnInit {
|
||||||
entryType: boolean = true;
|
entryType: boolean = true;
|
||||||
entries: Entry[] = [];
|
entries: Entry[] = [];
|
||||||
isSearchLocked: boolean = false;
|
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 {
|
ngOnInit(): void {
|
||||||
if (this.data.watchDate == null) {
|
if (!this.data || !this.data.watchDate) {
|
||||||
// ? no initial data was passed: populate date field with current date
|
// ? no initial data was passed: populate date field with current date
|
||||||
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
|
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user