Skip to content

Commit

Permalink
Merge pull request #86 from the-collab-lab/kd-create-emoji-component
Browse files Browse the repository at this point in the history
[KD] Refactor Emoji component from About page
  • Loading branch information
piecanoe authored Apr 5, 2024
2 parents aa3002f + fb05aa1 commit f186cd5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
7 changes: 7 additions & 0 deletions src/components/Emoji.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function Emoji({ children, label }) {
return (
<span role="img" aria-label={label}>
{children}
</span>
);
}
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './SingleList';
export * from './Dialog';
export * from './AddItem';
export * from './SortedItemsMap';
export * from './Emoji';
9 changes: 1 addition & 8 deletions src/views/About.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { Emoji } from '../components';
import './About.css';

export function About() {
function Emoji({ children, label }) {
return (
<span role="img" aria-label={label}>
{children}
</span>
);
}

return (
<>
<main className="About-main">
Expand Down
9 changes: 3 additions & 6 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Outlet, NavLink } from 'react-router-dom';
import { useAuth, SignInButton, SignOutButton } from '../api/useAuth.jsx';

import { Emoji } from '../components';
import './Layout.css';
import { auth } from '../api/config.js';

Expand Down Expand Up @@ -39,11 +39,8 @@ export function Layout() {
</main>
<footer className="Layout-footer">
<p className="Layout-footer-attribution">
Crafted with care{' '}
<span role="img" aria-label="purple-heart">
💜{' '}
</span>
by{' '}
Crafted with care <Emoji label="purple-heart">💜</Emoji>
{' '}by{' '}
<a
className="Layout-footer-link"
href="https://github.com/amalyam"
Expand Down

0 comments on commit f186cd5

Please sign in to comment.