Skip to content

Commit

Permalink
update routes to properly describe the new page
Browse files Browse the repository at this point in the history
  • Loading branch information
alexneyman-MSFT committed May 9, 2024
1 parent 839fa7a commit 7d8a421
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 147 deletions.
152 changes: 17 additions & 135 deletions apps/teams-test-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,9 @@ import { app, appInitialization, initialize } from '@microsoft/teams-js';
import React, { ReactElement } from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';

import AppAPIs from './components/AppAPIs';
import AppEntityAPIs from './components/AppEntityAPIs';
import AppInitializationAPIs from './components/AppInitialization';
import AppInstallDialogAPIs from './components/AppInstallDialog';
import AuthenticationAPIs from './components/AuthenticationAPIs';
import BarCodeAPIs from './components/BarCodeAPIs';
import CalendarAPIs from './components/CalendarAPIs';
import CallAPIs from './components/CallAPIs';
import ClipboardAPIs from './components/Clipboard';
import CustomAPIs from './components/Custom';
import DialogAPIs from './components/DialogAPIs';
import DialogCardAPIs from './components/DialogCardAPIs';
import DialogCardBotAPIs from './components/DialogCardBotAPIs';
import DialogUpdateAPIs from './components/DialogUpdateAPIs';
import DialogUrlAPIs from './components/DialogUrlAPIs';
import DialogUrlBotAPIs from './components/DialogUrlBotAPIs';
import GeoLocationAPIs from './components/GeoLocationAPIs';
import Links from './components/Links';
import LocationAPIs from './components/LocationAPIs';
import LogAPIs from './components/LogsAPIs';
import MailAPIs from './components/MailAPIs';
import MarketplaceAPIs from './components/MarketplaceAPIs';
import MediaAPIs from './components/MediaAPIs';
import MeetingAPIs from './components/MeetingAPIs';
import MenusAPIs from './components/MenusAPIs';
import NestedAppAuthAPIs from './components/NestedAppAuthAPIs';
import OtherAppStateChangedAPIs from './components/OtherAppStateChangeAPIs';
import PagesAPIs from './components/PagesAPIs';
import PagesAppButtonAPIs from './components/PagesAppButtonAPIs';
import PagesBackStackAPIs from './components/PagesBackStackAPIs';
import PagesConfigAPIs from './components/PagesConfigAPIs';
import PagesCurrentAppAPIs from './components/PagesCurrentAppAPIs';
import PagesTabsAPIs from './components/PagesTabsAPIs';
import PeopleAPIs from './components/PeopleAPIs';
import ChatAPIs from './components/privateApis/ChatAPIs';
import ExternalAppAuthenticationAPIs from './components/privateApis/ExternalAppAuthenticationAPIs';
import ExternalAppCardActionsAPIs from './components/privateApis/ExternalAppCardActionsAPIs';
import ExternalAppCommandsAPIs from './components/privateApis/ExternalAppCommandsAPIs';
import FilesAPIs from './components/privateApis/FilesAPIs';
import FullTrustAPIs from './components/privateApis/FullTrustAPIs';
import MeetingRoomAPIs from './components/privateApis/MeetingRoomAPIs';
import MessageChannelAPIs from './components/privateApis/MessageChannelAPIs';
import MonetizationAPIs from './components/privateApis/MonetizationAPIs';
import NotificationAPIs from './components/privateApis/NotificationAPIs';
import PrivateAPIs from './components/privateApis/PrivateAPIs';
import TeamsAPIs from './components/privateApis/TeamsAPIs';
import VideoExAPIs from './components/privateApis/VideoEffectsExAPIs';
import ProfileAPIs from './components/ProfileAPIs';
import RemoteCameraAPIs from './components/RemoteCameraAPIs';
import SearchAPIs from './components/SearchAPIs';
import SecondaryBrowserAPIs from './components/SecondaryBrowserAPIs';
import SharingAPIs from './components/SharingAPIs';
import StageViewAPIs from './components/StageViewAPIs';
import TeamsCoreAPIs from './components/TeamsCoreAPIs';
import ThirdPartyCloudStorageAPIs from './components/ThirdPartyCloudStorageAPIs';
import CookieAccessComponent from './components/ThirdPatryCookies';
import { isTestBackCompat } from './components/utils/isTestBackCompat';
import Version from './components/Version';
import VideoAPIs from './components/VideoEffectsApis';
import VisualMediaAPIs from './components/VisualMediaAPIs';
import WebStorageAPIs from './components/WebStorageAPIs';
import EmptyPage from './components/EmptyPage';
import SecondRoute from './pages/SecondRoute';
import TeamsTestApp from './pages/TeamsTestApp';

const urlParams = new URLSearchParams(window.location.search);

Expand Down Expand Up @@ -129,82 +70,23 @@ export const generateRegistrationMsg = (changeCause: string): string => {
return `Registration attempt has been initiated. If successful, this message will change when ${changeCause}.`;
};

// button to route to the second route
export const SecondRouteButton = (): ReactElement => (
<a href="/second-route">
<button>Go to Second Route</button>
</a>
);

const App = (): ReactElement => {
return (
<BrowserRouter>
<Routes>
<Route
path="/"
element={
<>
<div className="App-container">
<AppAPIs />
<AppInitializationAPIs />
<AppInstallDialogAPIs />
<AuthenticationAPIs />
<AppEntityAPIs />
<BarCodeAPIs />
<CalendarAPIs />
<CallAPIs />
<ChatAPIs />
<ClipboardAPIs />
<CookieAccessComponent />
<CustomAPIs />
<DialogAPIs />
<DialogCardAPIs />
<DialogCardBotAPIs />
<DialogUpdateAPIs />
<DialogUrlAPIs />
<DialogUrlBotAPIs />
<ExternalAppAuthenticationAPIs />
<ExternalAppCardActionsAPIs />
<ExternalAppCommandsAPIs />
<FilesAPIs />
<FullTrustAPIs />
<GeoLocationAPIs />
<Links />
<LocationAPIs />
<LogAPIs />
<MailAPIs />
<MarketplaceAPIs />
<MediaAPIs />
<MeetingAPIs />
<MeetingRoomAPIs />
<MenusAPIs />
<MessageChannelAPIs />
<MonetizationAPIs />
<NestedAppAuthAPIs />
<NotificationAPIs />
<OtherAppStateChangedAPIs />
<PagesAPIs />
<PagesAppButtonAPIs />
<PagesBackStackAPIs />
<PagesConfigAPIs />
<PagesCurrentAppAPIs />
<PagesTabsAPIs />
<PeopleAPIs />
<PrivateAPIs />
<ProfileAPIs />
<RemoteCameraAPIs />
<SearchAPIs />
<SecondaryBrowserAPIs />
<SharingAPIs />
<WebStorageAPIs />
<StageViewAPIs />
<TeamsCoreAPIs />
<TeamsAPIs />
<ThirdPartyCloudStorageAPIs />
<VideoAPIs />
<VideoExAPIs />
<VisualMediaAPIs />
</div>
<Version />
</>
}
/>
<Route path="/second-page" element={<EmptyPage />} />
</Routes>
</BrowserRouter>
<>
<BrowserRouter>
<Routes>
<Route path="/" element={<TeamsTestApp />} />
<Route path="/second-route" element={<SecondRoute />} />
</Routes>
</BrowserRouter>
</>
);
};

Expand Down
12 changes: 0 additions & 12 deletions apps/teams-test-app/src/components/EmptyPage.tsx

This file was deleted.

12 changes: 12 additions & 0 deletions apps/teams-test-app/src/pages/SecondRoute.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { ReactElement } from 'react';

import AppAPIs from '../components/AppAPIs';

const SecondRoute = (): ReactElement => (
<div>
This is an additional route for testing purposes.
<AppAPIs />
</div>
);

export default SecondRoute;
133 changes: 133 additions & 0 deletions apps/teams-test-app/src/pages/TeamsTestApp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import React from 'react';

import AppAPIs from '../components/AppAPIs';
import AppEntityAPIs from '../components/AppEntityAPIs';
import AppInitializationAPIs from '../components/AppInitialization';
import AppInstallDialogAPIs from '../components/AppInstallDialog';
import AuthenticationAPIs from '../components/AuthenticationAPIs';
import BarCodeAPIs from '../components/BarCodeAPIs';
import CalendarAPIs from '../components/CalendarAPIs';
import CallAPIs from '../components/CallAPIs';
import ClipboardAPIs from '../components/Clipboard';
import CustomAPIs from '../components/Custom';
import DialogAPIs from '../components/DialogAPIs';
import DialogCardAPIs from '../components/DialogCardAPIs';
import DialogCardBotAPIs from '../components/DialogCardBotAPIs';
import DialogUpdateAPIs from '../components/DialogUpdateAPIs';
import DialogUrlAPIs from '../components/DialogUrlAPIs';
import DialogUrlBotAPIs from '../components/DialogUrlBotAPIs';
import GeoLocationAPIs from '../components/GeoLocationAPIs';
import Links from '../components/Links';
import LocationAPIs from '../components/LocationAPIs';
import LogAPIs from '../components/LogsAPIs';
import MailAPIs from '../components/MailAPIs';
import MarketplaceAPIs from '../components/MarketplaceAPIs';
import MediaAPIs from '../components/MediaAPIs';
import MeetingAPIs from '../components/MeetingAPIs';
import MenusAPIs from '../components/MenusAPIs';
import NestedAppAuthAPIs from '../components/NestedAppAuthAPIs';
import OtherAppStateChangedAPIs from '../components/OtherAppStateChangeAPIs';
import PagesAPIs from '../components/PagesAPIs';
import PagesAppButtonAPIs from '../components/PagesAppButtonAPIs';
import PagesBackStackAPIs from '../components/PagesBackStackAPIs';
import PagesConfigAPIs from '../components/PagesConfigAPIs';
import PagesCurrentAppAPIs from '../components/PagesCurrentAppAPIs';
import PagesTabsAPIs from '../components/PagesTabsAPIs';
import PeopleAPIs from '../components/PeopleAPIs';
import ChatAPIs from '../components/privateApis/ChatAPIs';
import ExternalAppAuthenticationAPIs from '../components/privateApis/ExternalAppAuthenticationAPIs';
import ExternalAppCardActionsAPIs from '../components/privateApis/ExternalAppCardActionsAPIs';
import ExternalAppCommandsAPIs from '../components/privateApis/ExternalAppCommandsAPIs';
import FilesAPIs from '../components/privateApis/FilesAPIs';
import FullTrustAPIs from '../components/privateApis/FullTrustAPIs';
import MeetingRoomAPIs from '../components/privateApis/MeetingRoomAPIs';
import MessageChannelAPIs from '../components/privateApis/MessageChannelAPIs';
import MonetizationAPIs from '../components/privateApis/MonetizationAPIs';
import NotificationAPIs from '../components/privateApis/NotificationAPIs';
import PrivateAPIs from '../components/privateApis/PrivateAPIs';
import TeamsAPIs from '../components/privateApis/TeamsAPIs';
import VideoExAPIs from '../components/privateApis/VideoEffectsExAPIs';
import ProfileAPIs from '../components/ProfileAPIs';
import RemoteCameraAPIs from '../components/RemoteCameraAPIs';
import SearchAPIs from '../components/SearchAPIs';
import SecondaryBrowserAPIs from '../components/SecondaryBrowserAPIs';
import SharingAPIs from '../components/SharingAPIs';
import StageViewAPIs from '../components/StageViewAPIs';
import TeamsCoreAPIs from '../components/TeamsCoreAPIs';
import ThirdPartyCloudStorageAPIs from '../components/ThirdPartyCloudStorageAPIs';
import CookieAccessComponent from '../components/ThirdPatryCookies';
import Version from '../components/Version';
import VideoAPIs from '../components/VideoEffectsApis';
import VisualMediaAPIs from '../components/VisualMediaAPIs';
import WebStorageAPIs from '../components/WebStorageAPIs';

const TeamsTestApp: React.FC = () => {
return (
<>
<div className="App-container">
<AppAPIs />
<AppInitializationAPIs />
<AppInstallDialogAPIs />
<AuthenticationAPIs />
<AppEntityAPIs />
<BarCodeAPIs />
<CalendarAPIs />
<CallAPIs />
<ChatAPIs />
<ClipboardAPIs />
<CookieAccessComponent />
<CustomAPIs />
<DialogAPIs />
<DialogCardAPIs />
<DialogCardBotAPIs />
<DialogUpdateAPIs />
<DialogUrlAPIs />
<DialogUrlBotAPIs />
<ExternalAppAuthenticationAPIs />
<ExternalAppCardActionsAPIs />
<ExternalAppCommandsAPIs />
<FilesAPIs />
<FullTrustAPIs />
<GeoLocationAPIs />
<Links />
<LocationAPIs />
<LogAPIs />
<MailAPIs />
<MarketplaceAPIs />
<MediaAPIs />
<MeetingAPIs />
<MeetingRoomAPIs />
<MenusAPIs />
<MessageChannelAPIs />
<MonetizationAPIs />
<NestedAppAuthAPIs />
<NotificationAPIs />
<OtherAppStateChangedAPIs />
<PagesAPIs />
<PagesAppButtonAPIs />
<PagesBackStackAPIs />
<PagesConfigAPIs />
<PagesCurrentAppAPIs />
<PagesTabsAPIs />
<PeopleAPIs />
<PrivateAPIs />
<ProfileAPIs />
<RemoteCameraAPIs />
<SearchAPIs />
<SecondaryBrowserAPIs />
<SharingAPIs />
<WebStorageAPIs />
<StageViewAPIs />
<TeamsCoreAPIs />
<TeamsAPIs />
<ThirdPartyCloudStorageAPIs />
<VideoAPIs />
<VideoExAPIs />
<VisualMediaAPIs />
</div>
<Version />
</>
);
};

export default TeamsTestApp;

0 comments on commit 7d8a421

Please sign in to comment.