removed wrong stuff

This commit is contained in:
Hazel Noack
2025-07-10 13:05:38 +02:00
parent 46cc8b7989
commit 2e1d7d5564
7 changed files with 21 additions and 132 deletions

View File

@@ -1,8 +1,6 @@
package rendering
import (
"fmt"
"gitea.elara.ws/Hazel/transfem-startpage/internal/diyhrt"
)
@@ -15,6 +13,8 @@ type RenderingConfig struct {
SearchFormAction string
SearchInputName string
StoreFilter diyhrt.StoreFilter
Listings []diyhrt.Listing
Stores []diyhrt.Store
}
@@ -36,6 +36,10 @@ func DefaultRenderingConfig() RenderingConfig {
SearchPlaceholder: "Search on DuckDuckGo",
SearchFormAction: "https://duckduckgo.com/",
SearchInputName: "q",
StoreFilter: diyhrt.StoreFilter{
Limit: 5,
},
}
}
@@ -44,7 +48,6 @@ func (rc *RenderingConfig) LoadDiyHrt(listings []diyhrt.Listing) {
stores := make([]diyhrt.Store, 0)
for _, listing := range listings {
fmt.Println(listing)
if _, ok := existingStores[listing.Store.Id]; ok {
continue
}
@@ -53,5 +56,5 @@ func (rc *RenderingConfig) LoadDiyHrt(listings []diyhrt.Listing) {
}
rc.Listings = listings
rc.Stores = stores
rc.Stores = rc.StoreFilter.Filter(stores)
}