2024-05-13 14:16:16: merge [main:4f88d86ea2ec3d29ae7282a24b25fd132eb9406e];
This commit is contained in:
1 parent
739a9a3a4b
commit
98ad434b36
24 files changed
+141
-98
No files matched your search
@@ -1,27 +1,39 @@
|
||||
@import "src/constants/style/styleConst";
|
||||
|
||||
.applications-content {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-columns:250px 1fr;
|
||||
width: 100%;
|
||||
|
||||
.column-content {
|
||||
margin-left: $basic-margin;
|
||||
}
|
||||
|
||||
&__add-btn {
|
||||
display: flex;
|
||||
max-width: 240px;
|
||||
margin-left: auto;
|
||||
margin-bottom: $basic-margin * 2;
|
||||
}
|
||||
|
||||
&__update-btn {
|
||||
margin-right: $basic-margin;
|
||||
}
|
||||
|
||||
&__addToken-btn {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.link-btn {
|
||||
color: $blue-color;
|
||||
|
||||
&:hover {
|
||||
color: $text-color-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
.column {
|
||||
border-left: 0;
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ import { routePaths } from '@routes/routePaths.ts'
|
||||
import './applications-content.scss'
|
||||
|
||||
const { FormInput } = FormComponents
|
||||
const { EmptyData, Column, ContentColumn } = Layout
|
||||
const { EmptyData, Column } = Layout
|
||||
|
||||
interface ApplicationsContentPropTypes {
|
||||
selectedItemId: number
|
||||
@@ -39,7 +39,6 @@ interface ApplicationsContentPropTypes {
|
||||
|
||||
const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
||||
selectedItemId,
|
||||
currentApplicationsApp,
|
||||
setCurrentApplicationsApp
|
||||
}) => {
|
||||
const { data: applications, isLoading: isLoadingApplicationsContent = [] } =
|
||||
@@ -60,7 +59,7 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
||||
const [searchParams, setSearchParams] = useSearchParams('')
|
||||
const searchAppValue = searchParams.get('appSearch') || ''
|
||||
const navigate = useNavigate()
|
||||
const { appId } = useParams()
|
||||
const { appId = '' } = useParams()
|
||||
|
||||
const {
|
||||
handleSubmit,
|
||||
@@ -82,13 +81,11 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
||||
})
|
||||
}
|
||||
const renderTokenContent = () => {
|
||||
if (!currentApplicationsApp) {
|
||||
if (!appId) {
|
||||
return <EmptyData />
|
||||
}
|
||||
|
||||
return (
|
||||
<TokenContent key={currentApplicationsApp} id={currentApplicationsApp} />
|
||||
)
|
||||
return <TokenContent key={appId} id={Number(appId)} />
|
||||
}
|
||||
|
||||
const handleUpdateApplicationApp = (data: UpdateApplicationAppType) => {
|
||||
@@ -186,7 +183,7 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
||||
)}
|
||||
renderItems={renderColumnItems}
|
||||
searchValue={searchAppValue}
|
||||
selectedItemId={currentApplicationsApp.toString()}
|
||||
selectedItemId={appId}
|
||||
setSelectedItemId={(itemId: string) => {
|
||||
setCurrentApplicationsApp(Number(itemId))
|
||||
setSelectedItemId(
|
||||
@@ -204,7 +201,7 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
||||
)
|
||||
}}
|
||||
/>
|
||||
<ContentColumn>{renderTokenContent()}</ContentColumn>
|
||||
{renderTokenContent()}
|
||||
|
||||
<Modal
|
||||
onOk={handleSubmit(handleUpdateApplicationApp)}
|
||||
|
||||
Reference in new issue
Block a user