Inline tab option selection function
This commit is contained in:
parent
af6a4ebeaa
commit
49163a9d7f
1 changed files with 1 additions and 5 deletions
|
@ -20,10 +20,6 @@ function Classroom() {
|
|||
|
||||
const [tabData, setTabData] = useState(TAB_OPTIONS.announcements);
|
||||
|
||||
const onSelectTabOption = (_, value) => {
|
||||
setSelectedTabOption(value);
|
||||
};
|
||||
|
||||
const fetchAndPopulateAnnouncementsTabData = useCallback(async () => {
|
||||
const announcements = await fetchClassroomAnnouncements(params.id);
|
||||
const upcomingAssignments = await fetchUpcomingAssignments(params.id);
|
||||
|
@ -71,7 +67,7 @@ function Classroom() {
|
|||
layoutType={layoutType}
|
||||
classroom={classroom}
|
||||
selectedTabOption={selectedTabOption}
|
||||
onSelectTabOption={onSelectTabOption}
|
||||
onSelectTabOption={(_, value) => setSelectedTabOption(value)}
|
||||
announcementsTabData={
|
||||
tabData && tabData.tab === 'announcements' ? tabData : null
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue