Skip to content

Commit

Permalink
Issue #PS-000 chore: Fixed UI Issue and added toast message
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushikesh-Sonawane99 committed Jul 5, 2024
1 parent af60f92 commit 36c1859
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/components/CohortSelectionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useTheme } from '@mui/material/styles';
import { useTranslation } from 'next-i18next';
import Loader from './Loader';
import { cohortHierarchy } from '@/utils/app.constant';
import { showToastMessage } from './Toastify';

interface CohortSelectionSectionProps {
classId: string;
Expand Down Expand Up @@ -151,6 +152,7 @@ const CohortSelectionSection: React.FC<CohortSelectionSectionProps> = ({
} catch (error) {
console.error('Error fetching cohort list', error);
setLoading(false);
showToastMessage(t('COMMON.SOMETHING_WENT_WRONG'), 'error');
}
};

Expand Down
7 changes: 4 additions & 3 deletions src/pages/blocks/centre.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '@mui/icons-material';
import AddIcon from '@mui/icons-material/Add';
import FilterModalCenter from './components/FilterModalCenter';
import { toPascalCase } from '@/utils/Helper';

interface BlocksProps {
// Define any props if needed
Expand Down Expand Up @@ -110,10 +111,10 @@ const Blocks: React.FC<BlocksProps> = () => {

useEffect(() => {
const storedDistrict = localStorage.getItem('selectedBlockDistrict') || '';
setDistrict(storedDistrict);
setDistrict(toPascalCase(storedDistrict));

const storedBlock = localStorage.getItem('selectedBlock') || '';
setBlocks(storedBlock);
setBlocks(toPascalCase(storedBlock));
}, []);

useEffect(() => {
Expand Down Expand Up @@ -142,7 +143,7 @@ const Blocks: React.FC<BlocksProps> = () => {
fontWeight={'500'}
color={theme?.palette?.text?.primary}
>
{districts}, {state}
{districts}, {toPascalCase(state)}
</Typography>
<Box display={'flex'} alignItems={'center'} mb={2}>
<TextField
Expand Down
2 changes: 1 addition & 1 deletion src/pages/centers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const TeachingCenters = () => {
<Box>
<TextField
className="input_search"
placeholder={t('COMMON.SEARCH_FACILITATORS')}
placeholder={t('COMMON.SEARCH')}
color="secondary"
focused
sx={{
Expand Down

0 comments on commit 36c1859

Please sign in to comment.