Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Aug 6, 2020
1 parent 689d13c commit cbad502
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/store/src/state/context/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export const StoryContextProvider: FC<{ storyId: string | undefined }> = ({
}, [storyId, store]);
useEffect(() => {
const onObserver = (updatedStory?: Story) => {
if (updatedStory?.id === story?.id) {
if (updatedStory?.id === storyId) {
setStory(updatedStory);
}
};
store.addObserver(onObserver);
return () => store.removeObserver(onObserver);
}, [store, story?.id]);
}, [store, storyId]);
return (
<StoryContext.Provider
value={{
Expand Down
10 changes: 5 additions & 5 deletions ui/app/src/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const Footer: FC = () => {
siteUrl,
siteTitle,
siteCopyright = `Copyright \u00A9 ${new Date().getFullYear()}`,
footer,
footer = {},
} = config || {};
const leftActions: ActionItems = useMemo(() => {
const actions: ActionItems = [];
Expand All @@ -24,8 +24,8 @@ export const Footer: FC = () => {
id: 'copyright',
});
}
return footer?.left ? [...actions, ...footer.left] : actions;
}, [footer?.left, siteCopyright, author]);
return footer.left ? [...actions, ...footer.left] : actions;
}, [footer.left, siteCopyright, author]);

const rightActions: ActionItems = useMemo(() => {
const actions: ActionItems = [];
Expand All @@ -39,8 +39,8 @@ export const Footer: FC = () => {
id: 'site',
});
}
return footer?.right ? [...footer.right, ...actions] : actions;
}, [footer?.right, siteTitle, siteUrl]);
return footer.right ? [...footer.right, ...actions] : actions;
}, [footer.right, siteTitle, siteUrl]);

if (leftActions.length || rightActions.length) {
return (
Expand Down

0 comments on commit cbad502

Please sign in to comment.