Skip to content

Commit 3605a89

Browse files
author
pigr2
committed
back to previous model
1 parent 089a574 commit 3605a89

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

app/app.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ const storeManager = provideStore({ currentSearch: SearchReducer });
2929
<p>{{ state | json }}</p>
3030
</div>
3131
<div class="row col-md-8">
32-
<ul>
33-
<li *ngFor="let result of searchResults">
32+
<div *ngFor="let result of searchResults" class="thumbnail col-sm-6 col-md-4">
33+
<div class="caption">
3434
<h3>{{ result.title }}</h3>
35-
<img src="{{ result.thumbnailUrl }}" />
36-
</li>
37-
</ul>
35+
</div>
36+
<!--<img src="{{ result.thumbnailUrl }}" />-->
37+
</div>
3838
</div>
3939
</section>
4040
`

app/models/search-query.model.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export interface SearchQuery {
22
name: string;
33
location?: {
44
latitude: number,
5-
longitude: number,
6-
radius: number
7-
}
5+
longitude: number
6+
},
7+
radius: number
88
}

app/reducers/search.reducer.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ export const SearchReducer: ActionReducer<SearchQuery> = (state: SearchQuery, ac
1717
}
1818
});
1919
case ProximitySelector.StoreEvents.radius:
20-
//const position = Object.assign(state.location)
2120
return Object.assign({}, state, {
22-
location: {
23-
radius: action.payload.radius
24-
}
21+
radius: action.payload.radius
2522
});
2623
case ProximitySelector.StoreEvents.off:
2724
return Object.assign({}, state, {

app/services/youtube.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class YouTubeService {
2626
];
2727

2828
if (query.location) {
29-
const radius = query.location.radius ? query.location.radius : 50;
29+
const radius = query.radius ? query.radius : 50;
3030
const location =
3131
LOCATION_TEMPLATE
3232
.replace(/\{latitude\}/g, query.location.latitude.toString())

0 commit comments

Comments
 (0)