Skip to content

Commit

Permalink
Fix some small UI defects
Browse files Browse the repository at this point in the history
  • Loading branch information
iamlogand committed Oct 2, 2023
1 parent c9c5ffc commit 5b23361
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/components/FactionListItem.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
.symbols {
display: flex;
align-items: center;
justify-content: end;
justify-content: flex-end;
gap: 2px;
}

Expand Down
7 changes: 1 addition & 6 deletions frontend/components/detailSections/DetailSection_Senator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ const SenatorDetails = (props: SenatorDetailsProps) => {

const scrollableAreaRef = useRef<HTMLDivElement | null>(null)

const [fetchingLogs, setFetchingLogs] = useState(false)

// Get senator-specific data
const senator: Senator | null = selectedEntity?.id ? allSenators.byId[selectedEntity.id] ?? null : null
const faction: Faction | null = senator?.faction ? allFactions.byId[senator.faction] ?? null : null
Expand Down Expand Up @@ -112,7 +110,6 @@ const SenatorDetails = (props: SenatorDetailsProps) => {
if (!senator) return

await Promise.all([fetchActionLogs(), fetchSenatorActionLogs()])
setFetchingLogs(false)

senator.logsFetched = true
setAllSenators((senators: Collection<Senator>) => new Collection<Senator>(senators.asArray.map(s => s.id === senator.id ? senator : s)))
Expand All @@ -122,8 +119,6 @@ const SenatorDetails = (props: SenatorDetailsProps) => {
useEffect(() => {
if (!senator || senator?.logsFetched) return

setFetchingLogs(true)

// Fetch action logs and senator action logs
fetchLogs()
}, [senator, fetchLogs])
Expand All @@ -133,7 +128,7 @@ const SenatorDetails = (props: SenatorDetailsProps) => {
if (scrollableAreaRef.current) {
scrollableAreaRef.current.scrollTop = scrollableAreaRef.current.scrollHeight
}
}, [senatorDetailTab])
}, [senatorDetailTab, senator, senatorActionLogs])

// Change selected tab
const handleTabChange = (event: React.SyntheticEvent, newValue: number) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/modals/ModalTitle.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

.modalTitle button {
align-self: end;
align-self: flex-end;
width: 30px;
height: 30px;
border: none;
Expand Down

0 comments on commit 5b23361

Please sign in to comment.