Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
9ccb6587
Commit
9ccb6587
authored
Jan 07, 2026
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: sign up redirect
parent
64b487d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
SignUp.tsx
web/src/pages/SignUp.tsx
+1
-6
No files found.
web/src/pages/SignUp.tsx
View file @
9ccb6587
...
@@ -9,22 +9,18 @@ import AuthFooter from "@/components/AuthFooter";
...
@@ -9,22 +9,18 @@ import AuthFooter from "@/components/AuthFooter";
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Input
}
from
"@/components/ui/input"
;
import
{
Input
}
from
"@/components/ui/input"
;
import
{
authServiceClient
,
userServiceClient
}
from
"@/connect"
;
import
{
authServiceClient
,
userServiceClient
}
from
"@/connect"
;
import
{
useAuth
}
from
"@/contexts/AuthContext"
;
import
{
useInstance
}
from
"@/contexts/InstanceContext"
;
import
{
useInstance
}
from
"@/contexts/InstanceContext"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
useNavigateTo
from
"@/hooks/useNavigateTo"
;
import
{
handleError
}
from
"@/lib/error"
;
import
{
handleError
}
from
"@/lib/error"
;
import
{
User_Role
,
UserSchema
}
from
"@/types/proto/api/v1/user_service_pb"
;
import
{
User_Role
,
UserSchema
}
from
"@/types/proto/api/v1/user_service_pb"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
const
SignUp
=
()
=>
{
const
SignUp
=
()
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
navigateTo
=
useNavigateTo
();
const
actionBtnLoadingState
=
useLoading
(
false
);
const
actionBtnLoadingState
=
useLoading
(
false
);
const
[
username
,
setUsername
]
=
useState
(
""
);
const
[
username
,
setUsername
]
=
useState
(
""
);
const
[
password
,
setPassword
]
=
useState
(
""
);
const
[
password
,
setPassword
]
=
useState
(
""
);
const
{
generalSetting
:
instanceGeneralSetting
,
profile
}
=
useInstance
();
const
{
generalSetting
:
instanceGeneralSetting
,
profile
}
=
useInstance
();
const
{
initialize
}
=
useAuth
();
const
handleUsernameInputChanged
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
handleUsernameInputChanged
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
text
=
e
.
target
.
value
as
string
;
const
text
=
e
.
target
.
value
as
string
;
...
@@ -68,8 +64,7 @@ const SignUp = () => {
...
@@ -68,8 +64,7 @@ const SignUp = () => {
if
(
response
.
accessToken
)
{
if
(
response
.
accessToken
)
{
setAccessToken
(
response
.
accessToken
,
response
.
accessTokenExpiresAt
?
timestampDate
(
response
.
accessTokenExpiresAt
)
:
undefined
);
setAccessToken
(
response
.
accessToken
,
response
.
accessTokenExpiresAt
?
timestampDate
(
response
.
accessTokenExpiresAt
)
:
undefined
);
}
}
await
initialize
();
window
.
location
.
href
=
"/"
;
navigateTo
(
"/"
);
}
catch
(
error
:
unknown
)
{
}
catch
(
error
:
unknown
)
{
handleError
(
error
,
toast
.
error
,
{
handleError
(
error
,
toast
.
error
,
{
fallbackMessage
:
"Sign up failed"
,
fallbackMessage
:
"Sign up failed"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment