Subreddits
if data.Subreddits.Total == 0 {No Subreddits Found
Click here to add a new subreddit.
} else {package subredditsview
import "github.com/tigorlazuardi/redmage/views"
import "github.com/tigorlazuardi/redmage/views/components"
import "github.com/tigorlazuardi/redmage/models"
import "strconv"
import "fmt"
templ Subreddit(c *views.Context, data Data) {
@components.Doctype() {
@components.Head(c, components.HeadTitle("Redmage - Subreddits"))
@components.Body(c) {
@SubredditContent(c, data)
}
}
}
templ SubredditContent(c *views.Context, data Data) {
Click here to add a new subreddit.Subreddits
if data.Subreddits.Total == 0 {
No Subreddits Found
{ strconv.FormatInt(data.Subreddits.Total, 10) } Subreddits Registered
Add Subreddit