Skip to content

Commit

Permalink
Merge pull request #241 from suvarnakale/shiksha-2.0
Browse files Browse the repository at this point in the history
Issue #0000 bug: dropdown initial cohort value not coming issue fixed
  • Loading branch information
itsvick authored Jun 5, 2024
2 parents c6a23d9 + 9314a4d commit 381b543
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,15 @@ const Dashboard: React.FC<DashboardProps> = () => {
?.filter(Boolean);
setCohortsData(filteredData);
if (filteredData.length > 0) {
// setClassId(filteredData?.[0]?.cohortId);
// localStorage.setItem('classId', filteredData?.[0]?.cohortId);
if (typeof window !== 'undefined' && window.localStorage) {
const cohort = localStorage.getItem('classId') || '';
if (cohort !== '') {
setClassId(localStorage.getItem('classId') || '');
} else {
localStorage.setItem('classId', filteredData?.[0]?.cohortId);
setClassId(filteredData?.[0]?.cohortId);
}
}
setManipulatedCohortData(
filteredData.concat({ cohortId: 'all', name: 'All Centers' })
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,15 @@ const LoginPage = () => {
/>
</Box>

<Box marginTop={'1rem'} marginLeft={'0.8rem'}>
{/* <Box marginTop={'1rem'} marginLeft={'0.8rem'}>
<Link
sx={{ color: theme.palette.secondary.main }}
href="https://qa.prathamteacherapp.tekdinext.com/auth/realms/pratham/login-actions/reset-credentials?client_id=security-admin-console&tab_id=R-3zEZbbbyM"
underline="none"
>
{t('LOGIN_PAGE.FORGOT_PASSWORD')}
</Link>
</Box>
</Box> */}
<Box marginTop={'1.2rem'} className="remember-me-checkbox">
<Checkbox
onChange={(e) => setRememberMe(e.target.checked)}
Expand Down

0 comments on commit 381b543

Please sign in to comment.