Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend tweaks #1954

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add domain expand
JohnDuprey committed Dec 20, 2023
commit c0449040203642d66e83b8b75a7f25bf868d400f
32 changes: 26 additions & 6 deletions src/views/home/Home.jsx
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ import { TableModalButton } from 'src/components/buttons'

const Home = () => {
const [visible, setVisible] = useState(false)

const [domainVisible, setDomainVisible] = useState(false)
const currentTenant = useSelector((state) => state.app.currentTenant)
const {
data: organization,
@@ -292,11 +292,31 @@ const Home = () => {
<CCol sm={12} md={4} className="mb-3">
<p className="fw-lighter">Domain(s)</p>
{(isLoadingOrg || isFetchingOrg) && <Skeleton />}
{!isFetchingOrg &&
issuccessOrg &&
organization?.verifiedDomains?.map((item, idx) => (
<li key={idx}>{item.name}</li>
))}
<>
{!isFetchingOrg && issuccessOrg && (
<>
{organization.verifiedDomains?.slice(0, 5).map((item, idx) => (
<li key={idx}>{item.name}</li>
))}
{organization.verifiedDomains?.length > 5 && (
<>
<CCollapse visible={domainVisible}>
{organization.verifiedDomains?.slice(5).map((item, idx) => (
<li key={idx}>{item.name}</li>
))}
</CCollapse>
<CButton
size="sm"
className="mb-3"
onClick={() => setDomainVisible(!domainVisible)}
>
{domainVisible ? 'See less' : 'See more...'}
</CButton>
</>
)}
</>
)}
</>
</CCol>
<CCol sm={12} md={4} className="mb-3">
<p className="fw-lighter">Capabilities</p>
Loading