Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean-up react-contoso homepage #3008

Merged
merged 4 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion samples/react-contoso/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Login, SearchBox } from '@microsoft/mgt-react';
import { Login, SearchBox, ThemeToggle } from '@microsoft/mgt-react';
Mnickii marked this conversation as resolved.
Show resolved Hide resolved
import { PACKAGE_VERSION } from '@microsoft/mgt-element';
import { InfoButton } from '@fluentui/react-components/unstable';
import { SimpleLogin } from './SimpleLogin';
Expand Down Expand Up @@ -166,6 +166,7 @@ const HeaderComponent: React.FunctionComponent = () => {

<div className={styles.login}>
<ThemeSwitcher />
<ThemeToggle />
Mnickii marked this conversation as resolved.
Show resolved Hide resolved
<div className={mergeClasses(!isSignedIn ? styles.signedOut : styles.signedIn, styles.root)}>
<Login>
<SimpleLogin template="signed-in-button-content" />
Expand Down
44 changes: 0 additions & 44 deletions samples/react-contoso/src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,54 +1,10 @@
import * as React from 'react';
import { PageHeader } from '../components/PageHeader';
import {
FileList,
File,
Person,
Spinner,
Agenda,
PersonCard,
People,
Get,
ThemeToggle,
Picker,
TeamsChannelPicker
} from '@microsoft/mgt-react';
import { Messages } from '../components/Messages';
import { Loading } from '../components/Loading';
import { GetDefaultContent } from '../components/GetDefaultContent';

const HomePage: React.FunctionComponent = () => {
return (
<>
<ThemeToggle />
<TeamsChannelPicker />
<Picker
resource="me/todo/lists"
scopes={['tasks.read', 'tasks.readwrite']}
placeholder="Select a task list"
keyName="displayName"
/>
<FileList />
<Get resource="/me/messages" maxPages={1}>
<GetDefaultContent template="default" />
<Messages template="value"></Messages>
<Loading template="loading" message={'Loading your focused inbox...'}></Loading>
</Get>
<PageHeader title={'Home'} description={'Welcome to Contoso!'}></PageHeader>
<Spinner />
<People />
<File
driveId="b!M5IeZ2QKf0y18TIIXsDQkecHx1QrukxCte8X3n6ka6yn409-utaER7M2W9uRO4yB"
itemId="01WEUQSTSBWERA5VH4BFALQBXUDVUMT22G"
/>
<Person
personQuery="[email protected]"
personCardInteraction="click"
avatarType="initials"
avatarSize="auto"
/>
<Agenda />
<PersonCard personQuery="[email protected]" />
</>
);
};
Expand Down
Loading