Skip to content

Commit

Permalink
change map to forEach, use better tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
mcstepp committed Sep 23, 2024
1 parent 9ebe8d3 commit f81bafe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/dashboard/app/(app)/settings/root-keys/new/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const Client: React.FC<Props> = ({ apis }) => {
};

const initialCardStates: CardStates = {};
apis.map((api) => {
apis.forEach((api) => {
initialCardStates[api.id] = false;
});
const [cardStatesMap, setCardStatesMap] = useState(initialCardStates);
Expand Down Expand Up @@ -161,13 +161,13 @@ export const Client: React.FC<Props> = ({ apis }) => {
<Card>
<CardHeader>
<CollapsibleTrigger
className="flex items-center justify-between transition-all [&[data-state=open]>svg]:rotate-90 pb-6"
className="flex items-center justify-between transition-all pb-6"
aria-controls={api.id}
aria-expanded={cardStatesMap[api.id]}
>
<CardTitle className="break-all">{api.name}</CardTitle>
<ChevronRight
className="w-4 h-4 transition-transform duration-200"
className="w-4 h-4 transition-transform duration-200 data-[state=open]:rotate-90"
aria-hidden="true"
/>
</CollapsibleTrigger>
Expand Down

0 comments on commit f81bafe

Please sign in to comment.