-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Enable TypeScript support in this repo (#1459)
- Loading branch information
1 parent
356b183
commit 9a83d67
Showing
84 changed files
with
213 additions
and
134 deletions.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import type { WIDGETS } from '@src/constants'; | ||
import type { SIDEBARS } from './sidebars'; | ||
|
||
export type SidebarId = keyof typeof SIDEBARS; | ||
export type WidgetId = keyof typeof WIDGETS; | ||
export type UpgradeNotificationState = ( | ||
| 'accessLastHour' | ||
| 'accessHoursLeft' | ||
| 'accessDaysLeft' | ||
| 'FPDdaysLeft' | ||
| 'FPDLastHour' | ||
| 'accessDateView' | ||
| 'PastExpirationDate' | ||
); | ||
|
||
export interface SidebarContextData { | ||
toggleSidebar: (sidebarId?: SidebarId | null, widgetId?: WidgetId | null) => void; | ||
onNotificationSeen: () => void; | ||
setNotificationStatus: React.Dispatch<'active' | 'inactive'>; | ||
currentSidebar: SidebarId | null; | ||
notificationStatus: 'active' | 'inactive'; | ||
upgradeNotificationCurrentState: UpgradeNotificationState; | ||
setUpgradeNotificationCurrentState: React.Dispatch<UpgradeNotificationState>; | ||
shouldDisplaySidebarOpen: boolean; | ||
shouldDisplayFullScreen: boolean; | ||
courseId: string; | ||
unitId: string; | ||
hideDiscussionbar: boolean; | ||
hideNotificationbar: boolean; | ||
isNotificationbarAvailable: boolean; | ||
isDiscussionbarAvailable: boolean; | ||
} | ||
|
||
const SidebarContext = React.createContext<SidebarContextData>({} as SidebarContextData); | ||
|
||
export default SidebarContext; |
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
File renamed without changes.
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
2 changes: 0 additions & 2 deletions
2
.../new-sidebar/icons/RightSidebarFilled.jsx → .../new-sidebar/icons/RightSidebarFilled.tsx
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,5 +1,3 @@ | ||
import * as React from 'react'; | ||
|
||
const RightSidebarFilled = (props) => ( | ||
<svg | ||
width={24} | ||
|
2 changes: 0 additions & 2 deletions
2
...ew-sidebar/icons/RightSidebarOutlined.jsx → ...ew-sidebar/icons/RightSidebarOutlined.tsx
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,5 +1,3 @@ | ||
import * as React from 'react'; | ||
|
||
const RightSidebarOutlined = (props) => ( | ||
<svg | ||
width={24} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.