-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified the highlighted section #381
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
30f10b7
Modified the highlighted section
Coder-Srinivas 9df822c
Merged main
Coder-Srinivas c1b387d
Removed iconify-icon/ep package
Coder-Srinivas 2b75323
Changed from flex to group/stack also modified the responsiveness
Coder-Srinivas a52ed64
Fixed merge conflicts
Coder-Srinivas e042fc9
Made the icon a little bigger
Coder-Srinivas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { React } from '@common' | ||
import { ParticipantStudy } from '@api' | ||
import { Footer, TopNavBar } from '@components' | ||
import { Footer, TopNavBar, Icon } from '@components' | ||
import { useEnvironment, useIsMobileDevice } from '@lib' | ||
import { useParticipantStudies, useSearchStudies } from './learner/studies' | ||
import { StudyCard } from './learner/card' | ||
|
@@ -21,23 +21,51 @@ const HighlightedStudies: FC = () => { | |
const { highlightedStudies } = useParticipantStudies() | ||
const isMobile = useIsMobileDevice() | ||
|
||
const handleClick = () => { | ||
Coder-Srinivas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const element = document.getElementById('all-studies-unique-id') | ||
element?.scrollIntoView({ behavior: 'smooth' }) | ||
} | ||
|
||
if (!highlightedStudies.length) return null | ||
|
||
return ( | ||
<Box bg={colors.navy} py='md'> | ||
<Container> | ||
<Stack> | ||
<Title c='white' order={2}>Highlighted Studies</Title> | ||
{isMobile ? | ||
<MobileStudyCards studies={highlightedStudies} /> : | ||
<DesktopStudyCards studies={highlightedStudies} /> | ||
} | ||
</Stack> | ||
<Flex direction='column'> | ||
Coder-Srinivas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Flex justify='space-between'> | ||
<CuratedStudies /> | ||
{isMobile ? | ||
<MobileStudyCards studies={highlightedStudies} /> : | ||
<DesktopStudyCards studies={highlightedStudies} /> | ||
} | ||
</Flex> | ||
<Flex c={colors.green} justify='center' align='center'> | ||
<Flex direction='column' justify='center' align='center' style={{ cursor: 'pointer' }} onClick={()=> handleClick()}> | ||
<Text size='sm'>View all studies</Text> | ||
<Icon icon='arrowDown' width='.875rem'></Icon> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer to use |
||
</Flex> | ||
</Flex> | ||
</Flex> | ||
</Container> | ||
</Box> | ||
) | ||
} | ||
|
||
const CuratedStudies: FC = () => { | ||
|
||
return ( | ||
<Flex c={colors.white} direction='column' w='280px' h='350px' pt='2.25rem' mt='1rem'> | ||
Coder-Srinivas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Title order={2}>Curated Studies</Title> | ||
<Title order={5}>by our learning scientists</Title> | ||
|
||
<Stack mt='1rem'> | ||
<Text pr='1.5rem'>Deepen your understanding of learning habits with scientific studies currated by our team of education researchers.</Text> | ||
<Text>Accelerate your growth and tailor your path to your own needs.</Text> | ||
</Stack> | ||
</Flex> | ||
) | ||
} | ||
|
||
const LearnerDashboard = () => { | ||
const env = useEnvironment() | ||
|
||
|
@@ -90,7 +118,7 @@ export const SearchBar: FC<{search: string, setSearch: (search: string) => void} | |
|
||
export const StudiesTitle: FC<{search: string, filteredStudies: ParticipantStudy[]}> = () => { | ||
return ( | ||
<Title order={2}>All Studies</Title> | ||
<Title order={2} id='all-studies-unique-id'>All Studies</Title> | ||
) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets try to stick to
tabler/icons-react
or decide on a single set of icons to use in general, i think we have too many in the project now 😆