Skip to content

Commit

Permalink
Reorganized some components.
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-gonzalez1 committed Oct 30, 2023
1 parent 67ba058 commit 3fd7639
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
5 changes: 0 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ function App() {
>
<Leaderboard />
</Tab>

{/* Tab used to upload new images
<Tab eventKey="uploadItem" title="Upload">
<AddNewItemCard OnFormSubmit={addRatingItem} />
</Tab> */}
</Tabs>
</>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddNewItemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const AddNewItemCard = (props: AddNewItemCardProps) => {
</Modal.Footer>
</Modal>

<Card className="w-50">
<Card>
<Card.Body>
<Card.Title>Add New Item</Card.Title>
<hr />
Expand All @@ -120,7 +120,7 @@ export const AddNewItemCard = (props: AddNewItemCardProps) => {
<Form.Control
required
as="textarea"
rows={5}
rows={4}
{...register("description", {})}
/>
</Form.Group>
Expand Down
7 changes: 2 additions & 5 deletions src/components/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ export const HomePage = () => {
/* eslint-disable */
var [itemIndex, setItemIndex] = useState(0);

type Arr = {
arr: String[];
};
var [entryKeys, setEntryKeys] = useState<Array<string>>([]);

const numOfItems = 100; // Using 100 because it is more than what is in the database
Expand Down Expand Up @@ -102,12 +99,12 @@ export const HomePage = () => {

<div className="d-flex justify-content-center" style={{ padding: 20 }}>
<div style={{ padding: 30 }}>
<Button onClick={prev} size="lg">
<Button onClick={prev} hidden ={!isRating} size="lg">
Prev
</Button>
</div>
<div style={{ padding: 30 }}>
<Button onClick={next} size="lg">
<Button onClick={next} hidden ={!isRating} size="lg">
Next
</Button>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/components/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import { getRatingItemImage } from "../tasks/getRatingItems";

import { TierList } from "./TierList";

import { addRatingItem } from "../tasks/addItem";
import { AddNewItemCard } from "./AddNewItemCard";

function getTierListItems(ids: Array<string>) {
const promises: Array<Promise<{ id: string; url: string }>> = [];

Expand Down Expand Up @@ -149,6 +152,9 @@ export const ProfilePage = ({ ...props }: ProfilePageProps) => {
Sign Out
</Button>
</div>
<div className="py-2 d-flex justify-content-center gap-2">
<AddNewItemCard OnFormSubmit={addRatingItem} />
</div>
</Col>
</Row>
</Container>
Expand Down

0 comments on commit 3fd7639

Please sign in to comment.