Skip to content

Commit

Permalink
refactor: Move form templates and styles to common directory
Browse files Browse the repository at this point in the history
  • Loading branch information
prnk28 committed Dec 9, 2024
1 parent 6fbcb7c commit 8ceb890
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package forms

import (
"fmt"
"github.com/onsonr/sonr/pkg/blocks/layout"
"github.com/onsonr/sonr/pkg/common/styles/layout"
)

type CreateProfileData struct {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package forms

import "github.com/onsonr/sonr/pkg/blocks/layout"
import "github.com/onsonr/sonr/pkg/common/styles/layout"

type SetupWalletData struct {
TurnstileSiteKey string
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package text

import "github.com/onsonr/sonr/pkg/blocks/layout"
import "github.com/onsonr/sonr/pkg/common/styles/layout"

templ Header(title string, subtitle string) {
<div class="flex flex-col items-center justify-center h-full">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/gateway/handlers/register_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/go-webauthn/webauthn/protocol"
"github.com/labstack/echo/v4"
"github.com/onsonr/sonr/crypto/mpc"
"github.com/onsonr/sonr/pkg/blocks/forms"
"github.com/onsonr/sonr/pkg/common/response"
"github.com/onsonr/sonr/pkg/common/styles/forms"
"github.com/onsonr/sonr/pkg/gateway/internal/database"
"github.com/onsonr/sonr/pkg/gateway/pages/register"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/pages/index/error.templ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package index

import "github.com/onsonr/sonr/pkg/blocks/layout"
import "github.com/onsonr/sonr/pkg/common/styles/layout"

templ NoWebauthnErrorView() {
@layout.Root("Error | Sonr.ID") {
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/pages/index/error_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/gateway/pages/index/page.templ
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package index

import (
"github.com/onsonr/sonr/pkg/blocks/layout"
"github.com/onsonr/sonr/pkg/blocks/text"
"github.com/onsonr/sonr/pkg/common/styles/layout"
"github.com/onsonr/sonr/pkg/common/styles/text"
)

templ InitialView() {
Expand Down
4 changes: 2 additions & 2 deletions pkg/gateway/pages/index/page_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pkg/gateway/pages/register/page.templ
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package register

import (
"github.com/onsonr/sonr/pkg/blocks/forms"
"github.com/onsonr/sonr/pkg/blocks/layout"
"github.com/onsonr/sonr/pkg/blocks/text"
"github.com/onsonr/sonr/pkg/common/styles/layout"
"github.com/onsonr/sonr/pkg/common/styles/text"
)

templ ProfileFormView(data forms.CreateProfileData) {
Expand Down
5 changes: 2 additions & 3 deletions pkg/gateway/pages/register/page_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ceb890

Please sign in to comment.