From 8164129a09ccf6f4ee68e510136b54e83facb21c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20L=C3=A1szl=C3=B3?= <rlacko99@gmail.com>
Date: Sun, 24 Jan 2021 23:04:05 +0100
Subject: [PATCH] fix type imports
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafael László <rlacko99@gmail.com>
---
 src/client/types.ts         |  4 ++--
 src/context/UserContext.tsx | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/client/types.ts b/src/client/types.ts
index 9b50c0f..72d1328 100644
--- a/src/client/types.ts
+++ b/src/client/types.ts
@@ -1,4 +1,4 @@
-import { Profile } from '../types/types';
+import { IProfile } from '../types/Profile';
 
 export type EmptyReq = undefined;
 
@@ -11,5 +11,5 @@ export type RegisterReq = {
   password: string;
 };
 export type UserResponse = {
-  user: Profile;
+  user: IProfile;
 };
diff --git a/src/context/UserContext.tsx b/src/context/UserContext.tsx
index 4a9de33..6dbe3ef 100644
--- a/src/context/UserContext.tsx
+++ b/src/context/UserContext.tsx
@@ -1,27 +1,27 @@
 import React, { createContext, useState } from 'react';
-import { Profile, Role } from '../types/types';
+import { IProfile, Role } from '../types/Profile';
 
 interface ContextProps {
-  profile: Profile;
-  setProfile: (profile: Profile) => void;
+  profile: IProfile;
+  setProfile: (profile: IProfile) => void;
 }
 
 // Context
-const initialState: Profile = {
-  external_id: 'abcd',
+const initialState: IProfile = {
+  externalId: 'abcd',
   studentCardNumber: '1234',
-  roomNumber: '104',
-  picture: 'alma.jpg',
+  roomNumber: 104,
   role: Role.User,
   email: 'alma@gmail.com',
   name: 'Nagy Gizike',
   warnings: [],
+  notices: [],
 };
 export const userContext = createContext({} as ContextProps);
 const { Provider } = userContext;
 
 export const UserStateProvider: React.FC = ({ children }) => {
-  const [profile, setProfile] = useState<Profile>(initialState);
+  const [profile, setProfile] = useState<IProfile>(initialState);
 
   return <Provider value={{ profile, setProfile }}>{children}</Provider>;
 };
-- 
GitLab