Skip to content

Commit

Permalink
Merge pull request #151 from Gather307/150-fix-up-my-groups-page
Browse files Browse the repository at this point in the history
150 fix up my groups page
  • Loading branch information
zmattes04 authored Jun 4, 2024
2 parents fffed5e + f29dc43 commit 97833a0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
15 changes: 1 addition & 14 deletions frontend/src/components/NewGroupOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,9 @@ const CreateGroup = ({ postGroup }: CreateProps) => {
/>
<PopoverFooter
display="flex"
justifyContent="space-between"
justifyContent="center"
alignItems="center"
>
<Box width="30%">
<input
type="checkbox"
name="public"
id="public"
checked={group.isPublic === "on"}
onChange={handleChange}
className="checkbox"
/>
<label htmlFor="public" className="sidenote">
public
</label>
</Box>
<Box
display={`${errored.state ? "inherit" : "none"}`}
color="red"
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/pages/IndividualGroupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ const IndividualGroupPage: React.FC<Props> = ({
borderWidth="1px"
borderRadius="md"
flex="1"
overflowX="auto"
width="100%"
backgroundColor="rgba(0, 0, 0, 0.05)"
>
<Heading size="md" marginBottom="10px">
Expand All @@ -268,12 +270,14 @@ const IndividualGroupPage: React.FC<Props> = ({
)}
</HStack>
</Box>
<HStack spacing={4}>
<HStack spacing={4} width="100%">
<Box
padding="10px"
borderWidth="1px"
borderRadius="md"
flex="1"
flex="start"
overflowX="auto"
width="20%"
backgroundColor="rgba(0, 0, 0, 0.05)"
>
<Heading size="md" marginBottom="10px">
Expand Down
16 changes: 14 additions & 2 deletions frontend/src/pages/MyGroupsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,22 @@ const GroupPage: React.FC<Props> = ({
>
{stateVariable.user?.groups.length !== 0 &&
filteredGroups.length === 0 ? (
skelIds.map((id) => {
skelIds.map((id, ind) => {
const currentPage = Math.floor(ind / (gridDims[0] * gridDims[1]));
if (currentPage + 1 != selectedPage) return null;
const row = Math.floor(
(ind % (gridDims[1] * gridDims[0])) / gridDims[1],
);
const col = ind % gridDims[1];
return (
<GridItem w="100%" h="100%" key={`skelly${id}`}>
<SkeletonGroup width="100%" height="100%" />
<SkeletonGroup width="100%" height="100%"
corners={[
row === 0 || col === 0,
row === 0 || col === gridDims[1] - 1,
row === gridDims[0] - 1 || col === gridDims[1] - 1,
row === gridDims[0] - 1 || col === 0,
]}/>
</GridItem>
);
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/Basket.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

.b-header {
min-width: 80%;
min-width: 100%;
max-width: 100%;
justify-content: space-between;
align-items: center;
Expand Down

0 comments on commit 97833a0

Please sign in to comment.