fix dashboards and add empty state

This commit is contained in:
João Geonizeli
2022-07-27 22:41:22 -03:00
parent 7489cab78e
commit 89f39f93e9
4 changed files with 29 additions and 19 deletions

View File

@@ -31,7 +31,11 @@ export const whereDefaultState = (userContext: UserContext) => (
userContext.isOnlyTeacher ? {userId: userContext.user?.id} : {}
)
export const DashboardProvider: FC = ({children}) => {
type DashboardProviderProps = {
children: React.ReactNode
}
export const DashboardProvider = ({children}: DashboardProviderProps) => {
const userContext = useCurrentUser()
const [where, setWhere] = useState<QuestionWhereInput>(whereDefaultState(userContext))
const providerValue = useMemo(() => ({where, setWhere}), [