diff --git a/pkg/blocks/cards/profile.templ b/pkg/blocks/cards/profile.templ index 962a54f94..904246483 100644 --- a/pkg/blocks/cards/profile.templ +++ b/pkg/blocks/cards/profile.templ @@ -1,19 +1,19 @@ package cards -type SonrProfileData struct { - Address string - Handle string - Name string - ChainID string - CreationBlock string +// Helper function to shorten address +func shortenAddress(address string) string { + if len(address) <= 20 { + return address + } + return address[:16] + "..." + address[len(address)-4:] } templ SonrProfile(addr string, name string, handle string, creationBlock string) {
{ handle }
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(handle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 17, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 25, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -57,7 +65,7 @@ func SonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(shortenAddress(addr)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 24, Col: 58} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 32, Col: 58} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -70,7 +78,7 @@ func SonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(creationBlock) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 29, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 37, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -83,7 +91,7 @@ func SonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 33, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile.templ`, Line: 41, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -97,12 +105,4 @@ func SonrProfile(addr string, name string, handle string, creationBlock string) }) } -// Helper function to shorten address -func shortenAddress(address string) string { - if len(address) <= 20 { - return address - } - return address[:16] + "..." + address[len(address)-4:] -} - var _ = templruntime.GeneratedTemplate diff --git a/pkg/blocks/forms/register_passkey.templ b/pkg/blocks/forms/register_passkey.templ index 6e5ac1002..e1be172cf 100644 --- a/pkg/blocks/forms/register_passkey.templ +++ b/pkg/blocks/forms/register_passkey.templ @@ -12,7 +12,7 @@ type RegisterPasskeyData struct { templ RegisterPasskey(action, method string, data RegisterPasskeyData) {