Skip to content

Commit

Permalink
removed: deprecated or no more necessary code has been removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoehabb committed Dec 26, 2024
1 parent e8e017f commit 69a09fb
Show file tree
Hide file tree
Showing 31 changed files with 109 additions and 946 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ import {
Button,
ButtonType,
ButtonSize,
ButtonVariant,
} from "@litespace/luna/Button";
import { asFullAssetUrl } from "@litespace/luna/backend";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { ISession } from "@litespace/types";
import React from "react";
import { Link } from "react-router-dom";
import { Route } from "@/types/routes";

const PendingInterview: React.FC<{
interviewer: ISession.PopuldatedMember;
session: ISession.Self;
}> = ({ interviewer, session }) => {
}> = ({ interviewer }) => {
const intl = useFormatMessage();
return (
<div>
Expand Down Expand Up @@ -57,6 +54,7 @@ const PendingInterview: React.FC<{
</p>

<div className="flex flex-row gap-4 mt-6">
{/*
<Link to={Route.Call.replace(":id", session.sessionId)}>
<Button
size={ButtonSize.Small}
Expand All @@ -66,6 +64,7 @@ const PendingInterview: React.FC<{
{intl("global.labels.go")}
</Button>
</Link>
*/}
<Button size={ButtonSize.Small} type={ButtonType.Error}>
{intl("global.labels.cancel")}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import React, { useMemo } from "react";
import { marked } from "marked";
import markdown from "@/markdown/tutorOnboarding/interview.md?raw";
import RawHtml from "@/components/TutorOnboardingSteps/RawHtml";
import { FindPagedInterviewsProps } from "@/types/props";
// import ScheduledInterview from "@/components/TutorOnboardingSteps/Interview/ScheduledInterview";

const Interview: React.FC<{
interviews: IInterview.FindPagedInterviewsProps;
interviews: FindPagedInterviewsProps;
current: Element<IInterview.FindInterviewsApiResponse["list"]> | null;
}> = ({ current }) => {
// const onScheduleSuccess = useCallback(() => {
Expand Down
3 changes: 2 additions & 1 deletion apps/nova/src/components/TutorOnboardingSteps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import React from "react";
import Interview from "@/components/TutorOnboardingSteps/Interview";
import MediaShot from "@/components/TutorOnboardingSteps/MediaShot";
import { Element, IInterview } from "@litespace/types";
import { FindPagedInterviewsProps } from "@/types/props";

const TutorOnboardingSteps: React.FC<{
step: number;
interviews: IInterview.FindPagedInterviewsProps;
interviews: FindPagedInterviewsProps;
current: Element<IInterview.FindInterviewsApiResponse["list"]> | null;
}> = ({ step, interviews, current }) => {
if (step === TutorOnboardingStep.Interview)
Expand Down
19 changes: 11 additions & 8 deletions apps/nova/src/pages/Call.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ import cn from "classnames";
// import Messages from "@/components/Chat/Messages";
import { orNull, orUndefined } from "@litespace/sol/utils";
import {
useSessionMembers,
// useCall,
//useSessionMembers,
//usePeerIds,
useSessionV2,
useFindSessionRoomById,
useFullScreen,
usePeerIds,
} from "@litespace/headless/sessions";
import { useDisplayRecorder } from "@litespace/headless/recorder";
import { isGhost } from "@/lib/ghost";
Expand Down Expand Up @@ -56,8 +55,8 @@ const Call: React.FC = () => {
return callRoom.data.members.find((member) => member.id !== user?.id);
}, [callRoom.data, user?.id]);

const members = useSessionMembers(sessionId);
useEffect(() => console.log("In App members: ", members), [members]);
//const members = useSessionMembers(sessionId);
//useEffect(() => console.log("In App members: ", members), [members]);

// const messages = useMemo(
// () =>
Expand Down Expand Up @@ -118,6 +117,7 @@ const Call: React.FC = () => {

const fullScreen = useFullScreen<HTMLDivElement>();

/*
const peers = usePeerIds(
useMemo(
() => ({
Expand All @@ -130,6 +130,7 @@ const Call: React.FC = () => {
[sessionId, mateInfo?.id, user?.role]
)
);
*/

const onCloseSession = useCallback(() => {
// peers.ghost.refetch();
Expand All @@ -150,12 +151,12 @@ const Call: React.FC = () => {
useMemo(
() => ({
isGhost,
ghostPeerId: orNull(peers.ghost.data),
tutorPeerId: orNull(peers.tutor.data),
ghostPeerId: orNull("ghost"), // TODO: pass peers.ghost.data
tutorPeerId: orNull("ghost"), // TODO: pass peers.tutor.data
userId: orNull(user?.id),
onCloseSession,
}),
[onCloseSession, peers.ghost.data, peers.tutor.data, user?.id]
[onCloseSession, user?.id]
)
);

Expand Down Expand Up @@ -302,12 +303,14 @@ const Call: React.FC = () => {
/*
* TODO: replace this by members views
*/
/*
<div>
<h1>Joined members</h1>
{members.map((m) => (
<label className="mx-1">-{m}-</label>
))}
</div>
*/
}

{/* <Button
Expand Down
1 change: 1 addition & 0 deletions apps/nova/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * as User from "@/types/user";
export * as Props from "@/types/props";
24 changes: 24 additions & 0 deletions apps/nova/src/types/props.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { IInterview, ISession, Paginated } from "@litespace/types";
import { InfiniteData, UseInfiniteQueryResult } from "@tanstack/react-query";

export type FindPagedInterviewsProps = {
query: UseInfiniteQueryResult<
InfiniteData<
Paginated<{
interview: IInterview.Self;
session: ISession.Self;
members: ISession.PopuldatedMember[];
}>,
unknown
>,
Error
>;
list:
| {
interview: IInterview.Self;
session: ISession.Self;
members: ISession.PopuldatedMember[];
}[]
| null;
more: () => void;
};
6 changes: 0 additions & 6 deletions packages/atlas/src/atlas.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { User } from "@/user";
import { Auth } from "@/auth";
import { Backend } from "@litespace/types";
import { Session } from "@/session";
import { Plan } from "@/plan";
import { Coupon } from "@/coupon";
import { Invite } from "@/invite";
Expand All @@ -18,12 +17,10 @@ import { Invoice } from "@/invoice";
import { Topic } from "@/topic";
import { AuthToken } from "@/client";
import { Cache } from "@/cache";
import { Peer } from "@/peer";

export class Atlas {
public readonly user: User;
public readonly auth: Auth;
public readonly session: Session;
public readonly plan: Plan;
public readonly coupon: Coupon;
public readonly invite: Invite;
Expand All @@ -39,12 +36,10 @@ export class Atlas {
public readonly invoice: Invoice;
public readonly cache: Cache;
public readonly topic: Topic;
public readonly peer: Peer;

constructor(backend: Backend, token: AuthToken | null) {
this.user = new User(backend, token);
this.auth = new Auth(backend, token);
this.session = new Session(backend, token);
this.plan = new Plan(backend, token);
this.coupon = new Coupon(backend, token);
this.invite = new Invite(backend, token);
Expand All @@ -60,6 +55,5 @@ export class Atlas {
this.invoice = new Invoice(backend, token);
this.cache = new Cache(backend, token);
this.topic = new Topic(backend, token);
this.peer = new Peer(backend, token);
}
}
24 changes: 0 additions & 24 deletions packages/atlas/src/peer.ts

This file was deleted.

12 changes: 0 additions & 12 deletions packages/atlas/src/session.ts

This file was deleted.

Loading

0 comments on commit 69a09fb

Please sign in to comment.