Skip to content

Commit

Permalink
remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexneyman-MSFT committed May 20, 2024
1 parent 577cb35 commit 247dd92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
7 changes: 0 additions & 7 deletions apps/teams-test-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ 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 (
<>
Expand Down
12 changes: 5 additions & 7 deletions apps/teams-test-app/src/components/AppAPIs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,11 @@ const RegisterOnResumeHandler = (): React.ReactElement => {
onClick: async (setResult) => {
app.lifecycle.registerOnResumeHandler((context: ResumeContext): void => {
setResult('successfully called with context:' + JSON.stringify(context));
window.setTimeout(() => {
app.notifySuccess();
// get the route fromt he context
const route = new URL(context.contentUrl);
// navigate to the correct path based on URL
navigate(route.pathname);
});
// get the route fromt he context
const route = new URL(context.contentUrl);
// navigate to the correct path based on URL
navigate(route.pathname);
app.notifySuccess();
});

return 'registered';
Expand Down

0 comments on commit 247dd92

Please sign in to comment.