Skip to content

Commit 51ea4bc

Browse files
committed
Add toast when OAuth succeeds
1 parent 0648ba4 commit 51ea4bc

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

client/src/App.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import React from "react";
2-
import { useDraggablePane } from "./lib/hooks/useDraggablePane";
3-
import { useConnection } from "./lib/hooks/useConnection";
41
import {
52
ClientRequest,
63
CompatibilityCallToolResult,
@@ -11,15 +8,17 @@ import {
118
ListPromptsResultSchema,
129
ListResourcesResultSchema,
1310
ListResourceTemplatesResultSchema,
14-
ReadResourceResultSchema,
1511
ListToolsResultSchema,
12+
ReadResourceResultSchema,
1613
Resource,
1714
ResourceTemplate,
1815
Root,
1916
ServerNotification,
2017
Tool,
2118
} from "@modelcontextprotocol/sdk/types.js";
22-
import { useEffect, useRef, useState, Suspense } from "react";
19+
import React, { Suspense, useEffect, useRef, useState } from "react";
20+
import { useConnection } from "./lib/hooks/useConnection";
21+
import { useDraggablePane } from "./lib/hooks/useDraggablePane";
2322

2423
import { StdErrNotification } from "./lib/notificationTypes";
2524

@@ -33,6 +32,7 @@ import {
3332
MessageSquare,
3433
} from "lucide-react";
3534

35+
import { toast } from "react-toastify";
3636
import { z } from "zod";
3737
import "./App.css";
3838
import ConsoleTab from "./components/ConsoleTab";
@@ -226,6 +226,8 @@ const App = () => {
226226
const newUrl = new URL(window.location.href);
227227
newUrl.searchParams.delete("serverUrl");
228228
window.history.replaceState({}, "", newUrl.toString());
229+
// Show success toast for OAuth
230+
toast.success('Successfully authenticated with OAuth');
229231
// Connect to the server
230232
connectMcpServer();
231233
}
@@ -444,8 +446,8 @@ const App = () => {
444446

445447
<div className="w-full">
446448
{!serverCapabilities?.resources &&
447-
!serverCapabilities?.prompts &&
448-
!serverCapabilities?.tools ? (
449+
!serverCapabilities?.prompts &&
450+
!serverCapabilities?.tools ? (
449451
<div className="flex items-center justify-center p-4">
450452
<p className="text-lg text-gray-500">
451453
The connected server does not support any MCP capabilities

0 commit comments

Comments
 (0)