Skip to content

Commit

Permalink
fix: added type for platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
chibuike-19 committed Dec 5, 2024
1 parent f712e95 commit 835ab40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/frontend/src/network/projects/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ export type UpdateProjectProps = {

export type InvitePeerProps = {
users: { role: "co-Host" | "Subscriber"; userId: string }[];
};
};


export type platforms = "Twitch" | "Youtube"
3 changes: 2 additions & 1 deletion packages/frontend/src/routes/dashboard/destination/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { fetchPlatforms } from "../../../network/projects/projects";
import { EmptyCard } from "../../../lib/components/emptyCard";
import { FaEllipsisVertical } from "react-icons/fa6";
import { Loader } from "../../../lib/Loader";
import { platforms } from "../../../network/projects/types";

export const Destination = () => {
const [viewDestinations, setViewDestinations] = useState(true);
Expand Down Expand Up @@ -107,7 +108,7 @@ export const Destination = () => {
}
}, []);

const handleDisconnect = async (platform: "Twitch" | "Youtube") => {
const handleDisconnect = async (platform: platforms) => {
try {
const response = await disconnectPlatform(platform);
toast.success(response?.message);
Expand Down

0 comments on commit 835ab40

Please sign in to comment.