Skip to content

Commit

Permalink
Edited UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Varstak committed Nov 15, 2023
1 parent 86bed2b commit 9bef227
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
55 changes: 48 additions & 7 deletions frontend/components/QuestionsPage/FilterBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// FilterBar.tsx
import * as React from 'react';
import FilterSelector from './FilterSelector'; // Import your FilterSelector component
import { Box, Button } from '@mui/material';
import { Box, Button, Grid, Typography } from '@mui/material';

interface FilterBarProps {
categoryOptions: { value: number; label: string }[];
Expand Down Expand Up @@ -30,13 +30,54 @@ const FilterBar: React.FC<FilterBarProps> = ({
};

return (
<Box sx={{paddingX: 2, paddingY: 1}}>
<FilterSelector options={categoryOptions} selectedValues={selectedCategories} onChange={setSelectedCategories} />
<FilterSelector options={difficultyOptions} selectedValues={selectedDifficulties} onChange={setSelectedDifficulties} />
<Button onClick={handleApplyFilters}>Apply Filters</Button>
<Button onClick={handleResetFilters}>Reset Filters</Button>
<Box sx={{ padding: 2 }}>
<Grid container spacing={2}>
<Grid item>
<Box>
<Typography variant="h6" gutterBottom>
Category
</Typography>
<FilterSelector
options={categoryOptions}
selectedValues={selectedCategories}
onChange={setSelectedCategories}
/>
</Box>
</Grid>
<Grid item>
<Box>
<Typography variant="h6" gutterBottom>
Difficulty
</Typography>
<FilterSelector
options={difficultyOptions}
selectedValues={selectedDifficulties}
onChange={setSelectedDifficulties}
/>
</Box>
</Grid>
<Grid item>
<Button
onClick={handleApplyFilters}
variant="contained"
className="bg-blue-400"
>
Apply Filters
</Button>
</Grid>
<Grid item>
<Button
onClick={handleResetFilters}
variant="contained"
className="bg-blue-400"
>
Reset Filters
</Button>
</Grid>
</Grid>
</Box>
);

);
};

export default FilterBar;
5 changes: 5 additions & 0 deletions mongodb-database/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DB_CONN_STRING="mongodb+srv://Alexander:[email protected]/?retryWrites=true&w=majority&appName=AtlasApp"

# Port - Set to 3001 temporarily to deconflict with frontend and user-service
NEXT_PUBLIC_PORT_NUMBER=3002

0 comments on commit 9bef227

Please sign in to comment.