Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
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
Arjun Jhukal
sweepstake
Commits
28e5e706
Commit
28e5e706
authored
Oct 16, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the button label at update profile and add player form
parent
f28e87e2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
23 deletions
+30
-23
loading.tsx
...hboard)/(user)/(outsideAuth)/buy-coins/[slug]/loading.tsx
+0
-1
AccountTab.tsx
...p/(dashboard)/(user)/(privateUser)/account/AccountTab.tsx
+1
-1
TabController.tsx
src/components/molecules/TabController.tsx
+2
-2
Profile.tsx
src/components/organism/Header/Profile.tsx
+23
-16
AddPlayerForm.tsx
...rd/adminDashboard/players/addPlayerForm/AddPlayerForm.tsx
+2
-2
index.tsx
...board/userDashboard/account/profile/editProfile/index.tsx
+2
-1
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/buy-coins/[slug]/loading.tsx
View file @
28e5e706
// components/Loading.tsx
// components/Loading.tsx
"use client"
;
"use client"
;
import
React
from
"react"
;
import
React
from
"react"
;
import
LotifyLoading
from
"@/components/atom/LotifyLoading"
;
import
GlobalLoading
from
"@/components/organism/GlobalLoading"
;
import
GlobalLoading
from
"@/components/organism/GlobalLoading"
;
export
default
function
Loading
()
{
export
default
function
Loading
()
{
...
...
src/app/(dashboard)/(user)/(privateUser)/account/AccountTab.tsx
View file @
28e5e706
...
@@ -22,7 +22,7 @@ export default function AccountTab() {
...
@@ -22,7 +22,7 @@ export default function AccountTab() {
const
renderTabContent
=
()
=>
{
const
renderTabContent
=
()
=>
{
switch
(
currentActiveTab
)
{
switch
(
currentActiveTab
)
{
case
"account_detail"
:
case
"account_detail"
:
return
<
EditUserProfile
id=
{
user
?.
id
as
string
|
""
}
/>;
return
<
EditUserProfile
id=
{
user
?.
id
as
string
|
""
}
buttonLabel=
"Update"
/>;
case
"wallet_information"
:
case
"wallet_information"
:
return
<
EditUserWallet
/>;
return
<
EditUserWallet
/>;
case
"change_password"
:
case
"change_password"
:
...
...
src/components/molecules/TabController.tsx
View file @
28e5e706
...
@@ -66,9 +66,9 @@ export default function TabController({
...
@@ -66,9 +66,9 @@ export default function TabController({
</
Box
>
</
Box
>
{
/* Mobile Tabs as Popper */
}
{
/* Mobile Tabs as Popper */
}
<
Box
className=
"flex md:hidden"
>
<
Box
className=
"flex md:hidden
mb-4
"
>
<
Button
ref=
{
anchorRef
}
onClick=
{
handleToggle
}
color=
"primary"
className=
"!justify-between !p-2 !border !border-solid !border-gray-600 !rounded-lg"
endIcon=
{
<
ArrowDown2
size=
{
20
}
/>
}
>
<
Button
ref=
{
anchorRef
}
onClick=
{
handleToggle
}
color=
"primary"
className=
"!justify-between !p-2 !border !border-solid !border-gray-600 !rounded-lg"
endIcon=
{
<
ArrowDown2
size=
{
20
}
/>
}
>
<
Typography
>
<
Typography
className=
"flex gap-4"
>
{
currentTabIcon
}
{
currentTabIcon
}
{
currentTabLabel
}
</
Typography
>
{
currentTabLabel
}
</
Typography
>
</
Button
>
</
Button
>
...
...
src/components/organism/Header/Profile.tsx
View file @
28e5e706
...
@@ -5,7 +5,7 @@ import { PATH } from '@/routes/PATH';
...
@@ -5,7 +5,7 @@ import { PATH } from '@/routes/PATH';
import
{
clearTokens
}
from
'@/slice/authSlice'
;
import
{
clearTokens
}
from
'@/slice/authSlice'
;
import
{
Box
,
Button
,
ButtonBase
,
ClickAwayListener
,
Fade
,
List
,
ListItem
,
ListItemButton
,
ListItemIcon
,
ListItemText
,
Paper
,
Popper
,
Stack
,
Typography
}
from
'@mui/material'
import
{
Box
,
Button
,
ButtonBase
,
ClickAwayListener
,
Fade
,
List
,
ListItem
,
ListItemButton
,
ListItemIcon
,
ListItemText
,
Paper
,
Popper
,
Stack
,
Typography
}
from
'@mui/material'
import
Link
from
'next/link'
;
import
Link
from
'next/link'
;
import
{
use
Router
}
from
'next/navigation'
;
import
{
use
Pathname
,
useRouter
,
useSearchParams
}
from
'next/navigation'
;
import
React
,
{
useRef
,
useState
}
from
'react'
import
React
,
{
useRef
,
useState
}
from
'react'
const
avataur1
=
'/assets/images/avatar-6.png'
;
const
avataur1
=
'/assets/images/avatar-6.png'
;
import
{
ArrowDown2
,
ArrowUp2
,
Coin
,
Logout
,
MoneySend
,
Profile
,
Wallet2
}
from
"@wandersonalwes/iconsax-react"
;
import
{
ArrowDown2
,
ArrowUp2
,
Coin
,
Logout
,
MoneySend
,
Profile
,
Wallet2
}
from
"@wandersonalwes/iconsax-react"
;
...
@@ -17,6 +17,8 @@ export default function ProfileBlock() {
...
@@ -17,6 +17,8 @@ export default function ProfileBlock() {
const
handleToggle
=
()
=>
{
const
handleToggle
=
()
=>
{
setOpen
((
prevOpen
)
=>
!
prevOpen
);
setOpen
((
prevOpen
)
=>
!
prevOpen
);
};
};
const
pathname
=
usePathname
();
const
search
=
useSearchParams
();
const
dispatch
=
useAppDispatch
();
const
dispatch
=
useAppDispatch
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
user
=
useAppSelector
((
state
)
=>
state
?.
auth
.
user
);
const
user
=
useAppSelector
((
state
)
=>
state
?.
auth
.
user
);
...
@@ -28,6 +30,10 @@ export default function ProfileBlock() {
...
@@ -28,6 +30,10 @@ export default function ProfileBlock() {
};
};
const
id
=
open
?
'profile-dropdown'
:
""
const
id
=
open
?
'profile-dropdown'
:
""
React
.
useEffect
(()
=>
{
setOpen
(
false
);
},
[
pathname
,
search
])
const
handleLogout
=
(
e
:
React
.
MouseEvent
)
=>
{
const
handleLogout
=
(
e
:
React
.
MouseEvent
)
=>
{
router
.
replace
(
PATH
.
AUTH
.
LOGIN
.
ROOT
);
router
.
replace
(
PATH
.
AUTH
.
LOGIN
.
ROOT
);
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -236,21 +242,22 @@ export default function ProfileBlock() {
...
@@ -236,21 +242,22 @@ export default function ProfileBlock() {
zIndex
:
2
,
zIndex
:
2
,
padding
:
0
,
padding
:
0
,
}
}
>
}
}
>
{
!
item
?.
onClick
?
<
Link
{
!
item
?.
onClick
?
href=
{
item
.
href
||
""
}
<
Link
href=
{
item
.
href
||
""
}
className=
{
`flex items-center py-3 px-4 `
}
className=
{
`flex items-center py-3 px-4 `
}
>
>
<
ListItemIcon
className=
"min-w-[30px] mr-1 group-hover:text-primary"
>
{
item
.
icon
}
</
ListItemIcon
>
<
ListItemIcon
className=
"min-w-[30px] mr-1 group-hover:text-primary"
>
{
item
.
icon
}
</
ListItemIcon
>
<
ListItemText
primary=
{
item
.
label
}
className=
'group-hover:text-primary'
/>
<
ListItemText
primary=
{
item
.
label
}
className=
'group-hover:text-primary'
/>
</
Link
>
:
<
ListItemButton
</
Link
>
:
href=
{
item
.
href
||
""
}
<
ListItemButton
onClick=
{
item
.
onClick
}
href=
{
item
.
href
||
""
}
className=
{
`flex items-center py-3 px-4 !wit`
}
onClick=
{
item
.
onClick
}
>
className=
{
`flex items-center py-3 px-4 !wit`
}
<
ListItemIcon
className=
"min-w-[30px] mr-1 group-hover:text-primary"
>
{
item
.
icon
}
</
ListItemIcon
>
>
<
ListItemText
primary=
{
item
.
label
}
className=
'group-hover:text-primary'
/>
<
ListItemIcon
className=
"min-w-[30px] mr-1 group-hover:text-primary"
>
{
item
.
icon
}
</
ListItemIcon
>
</
ListItemButton
>
}
<
ListItemText
primary=
{
item
.
label
}
className=
'group-hover:text-primary'
/>
</
ListItemButton
>
}
</
ListItem
>
</
ListItem
>
))
}
))
}
</
List
>
</
List
>
...
...
src/components/pages/dashboard/adminDashboard/players/addPlayerForm/AddPlayerForm.tsx
View file @
28e5e706
...
@@ -7,7 +7,7 @@ import { FormikProps } from 'formik'
...
@@ -7,7 +7,7 @@ import { FormikProps } from 'formik'
import
{
useRouter
}
from
'next/navigation'
import
{
useRouter
}
from
'next/navigation'
import
React
from
'react'
import
React
from
'react'
export
default
function
AddPlayerForm
({
formik
,
id
,
data
,
loading
}:
{
formik
:
FormikProps
<
PlayerProps
>
,
id
?:
string
,
data
?:
SinlgePlayerResponseProps
,
loading
?:
boolean
})
{
export
default
function
AddPlayerForm
({
formik
,
id
,
data
,
loading
,
buttonLabel
}:
{
formik
:
FormikProps
<
PlayerProps
>
,
id
?:
string
,
data
?:
SinlgePlayerResponseProps
,
loading
?:
boolean
,
buttonLabel
?:
string
})
{
const
router
=
useRouter
();
const
router
=
useRouter
();
console
.
log
(
loading
)
console
.
log
(
loading
)
...
@@ -187,7 +187,7 @@ export default function AddPlayerForm({ formik, id, data, loading }: { formik: F
...
@@ -187,7 +187,7 @@ export default function AddPlayerForm({ formik, id, data, loading }: { formik: F
router.push(PATH.ADMIN.PLAYERS.ROOT)
router.push(PATH.ADMIN.PLAYERS.ROOT)
}}>Cancel Player Edit</Button> : null} */
}
}}>Cancel Player Edit</Button> : null} */
}
<
Button
type=
"submit"
variant=
"contained"
color=
"primary"
sx=
{
{
color
:
"#fff"
}
}
>
<
Button
type=
"submit"
variant=
"contained"
color=
"primary"
sx=
{
{
color
:
"#fff"
}
}
>
{
!
loading
?
`
Confirm ${id ? "Player Update" : "Player Addition"
}`
:
"Updating"
}
{
!
loading
?
`
${buttonLabel ? buttonLabel : `
Confirm
$
{
id
?
"Player Update"
:
"Player Addition"
}
`
}`
:
"Updating"
}
</
Button
>
</
Button
>
</
div
>
</
div
>
</
form
>
</
form
>
...
...
src/components/pages/dashboard/userDashboard/account/profile/editProfile/index.tsx
View file @
28e5e706
...
@@ -10,7 +10,7 @@ import { useFormik } from 'formik';
...
@@ -10,7 +10,7 @@ import { useFormik } from 'formik';
import
{
useRouter
}
from
'next/navigation'
;
import
{
useRouter
}
from
'next/navigation'
;
import
React
from
'react'
import
React
from
'react'
export
default
function
EditUserProfile
({
id
}:
{
id
:
string
})
{
export
default
function
EditUserProfile
({
id
,
buttonLabel
}:
{
id
:
string
,
buttonLabel
?:
string
;
})
{
const
dispatch
=
useAppDispatch
();
const
dispatch
=
useAppDispatch
();
const
router
=
useRouter
();
const
router
=
useRouter
();
...
@@ -115,6 +115,7 @@ export default function EditUserProfile({ id }: { id: string }) {
...
@@ -115,6 +115,7 @@ export default function EditUserProfile({ id }: { id: string }) {
data=
{
formattedData
}
data=
{
formattedData
}
id=
{
id
}
id=
{
id
}
loading=
{
isLoading
}
loading=
{
isLoading
}
buttonLabel=
{
buttonLabel
}
/>
/>
)
)
}
}
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