-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
760 additions
and
409 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const map = {}; | ||
window.document.addEventListener = jest.fn((event, callback) => { | ||
map[event] = callback; | ||
}); | ||
window.addEventListener = jest.fn((event, callback) => { | ||
map[event] = callback; | ||
}); | ||
|
||
const event = jest.fn(e => map[e.name](e)); | ||
export const document = { event }; | ||
export default { ...document, document }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* eslint-disable arrow-body-style */ | ||
/* eslint-disable import/no-named-as-default */ | ||
/* eslint-disable no-unused-expressions */ | ||
import React from 'react'; | ||
import Logout from '../../feature/auth/logout/Logout'; | ||
|
||
const MenuDropDown = (props) => { | ||
const { user: { userName } } = props; | ||
return ( | ||
<div className="dropdown-menu"> | ||
<ul> | ||
<li className="user-name"> | ||
{`@${userName}`} | ||
</li> | ||
<a href="/profile"> | ||
<li> | ||
Profile | ||
</li> | ||
</a> | ||
<a href="/Create"> | ||
<li> | ||
Create article | ||
</li> | ||
</a> | ||
<a href="/Create"> | ||
<li> | ||
Bookmarks | ||
</li> | ||
</a> | ||
<Logout /> | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MenuDropDown; |
Oops, something went wrong.