Skip to content

Commit

Permalink
Added ProfileAvatar component and referenced it in _app.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-codegen[bot] authored Sep 20, 2023
1 parent 0aca018 commit 1b99b6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/components/ProfileAvatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import classNames from 'classnames';

const ProfileAvatar: React.FC = () => {
// UI for avatar and profile
return (
<div className={classNames('daisy-avatar')}>
<img src='avatar.png' alt='Profile avatar' className={classNames('avatar-image')}/>

Check warning on line 8 in src/components/ProfileAvatar.tsx

View workflow job for this annotation

GitHub Actions / Lint with ESLint and Prettier

Do not use `<img>` element. Use `<Image />` from `next/image` instead. See: https://nextjs.org/docs/messages/no-img-element
<p className={classNames('username')}>Username</p>
</div>
);
};

export default ProfileAvatar;
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import ThemeProvider from "@components/ui/Theme/ThemeProvider";
import "../styles/globals.css";
import { QueryClient, QueryClientProvider } from "react-query";
import { v4 as uuid } from "uuid";
import { atom } from "jotai";
import { atom } from 'jotai';
import ProfileAvatar from '../components/ProfileAvatar';

// Create a client
const queryClient = new QueryClient();
Expand All @@ -17,6 +18,7 @@ const MyApp: AppType = ({ Component, pageProps: { ...pageProps } }) => {
// Provide the client to your App
<ThemeProvider>
<QueryClientProvider client={queryClient}>
<ProfileAvatar />
<Component {...pageProps} />
</QueryClientProvider>
</ThemeProvider>
Expand Down

0 comments on commit 1b99b6a

Please sign in to comment.