Skip to content

Commit

Permalink
change: use ProfileClass on ProfilePage
Browse files Browse the repository at this point in the history
  • Loading branch information
NiiMiyo committed Dec 2, 2023
1 parent 9a12b5a commit 54794dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pages/Profile/ProfileContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext } from "react"
import type { Profile } from "@/types/Profile";
import type { ProfileClass } from "@/types/Profile";
import type { Group } from "@/types/Group";
import type { Competence, CompetenceType, Level } from "@/types/Competence";
import type { Recommendation } from "@/types/Recommendation";
Expand All @@ -10,7 +10,7 @@ import type { Folder } from "@/types/Capacity";
export type ProfileContextType = null | {
accessingLoggedUser: boolean;

profile: Profile;
profile: ProfileClass;
editCompetence: Competence | null;

allCompetenceTypes: CompetenceType[];
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as SwalUtils from "@/utils/sweetalertUtils";
import { AuthContext } from "@/contexts/Auth";
import { SelectionBar } from "./SelectionBar/SelectionBar";

import { ProfileClass } from "@/types/Profile";
import './Profile.css';

export function ProfilePage() {
Expand All @@ -27,7 +28,7 @@ export function ProfilePage() {
accessingLoggedUser: loaderData.accessingLoggedUser,
allCompetenceTypes: loaderData.allCompetenceTypes,
editCompetence: null,
profile: loaderData.profile!,
profile: new ProfileClass(loaderData.profile!),
profileListData: {
achievements: loaderData.profileListData.achievements,
competences: loaderData.profileListData.competences,
Expand Down

0 comments on commit 54794dc

Please sign in to comment.