Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karlosos committed Nov 21, 2023
1 parent 1fbb6ab commit e3773b5
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 23 deletions.
11 changes: 7 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
name="description"
content="Browse your kindle clippings without hassle. No account needed."
/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/clippings/books-list/BookItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const BookItem = ({ book }) => {
>
Export
</Button>
<NavigationButton onClick={handleNavigateBook} type='button'>
<NavigationButton onClick={handleNavigateBook} type="button">
<Chevron>
<ChevronsRightIcon />
</Chevron>
Expand Down
2 changes: 0 additions & 2 deletions src/app/features/clippings/books-list/BookItem.style.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const NavigationButton = styled.button`
cursor: pointer;
`;


export const Chevron = styled.div`
display: flex;
justify-content: center;
Expand Down Expand Up @@ -128,4 +127,3 @@ export const StatisticLabel = styled(Statistic.Label)`
font-size: 11px;
}
`;

2 changes: 1 addition & 1 deletion src/app/features/clippings/clippingsSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ export { booksListFromQuotes };
export default clippingsSlice.reducer;

// Selectors
export const selectBooksCount = (state) => state.clippings.books.length;
export const selectBooksCount = (state) => state.clippings.books.length;
8 changes: 7 additions & 1 deletion src/app/features/clippings/highlights/HighlightsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import React, { useRef, useState } from 'react';
import { Pagination } from 'semantic-ui-react';

import HighlightItem from './HighlightItem';
import { Content, Footer, MainHeader, Title, Wrapper } from './HighlightsList.style';
import {
Content,
Footer,
MainHeader,
Title,
Wrapper,
} from './HighlightsList.style';

const HighlightsList = ({ title, highlights, bookInfoVisible }) => {
const [activePage, setActivePage] = useState(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const MainHeader = styled.div`

export const Title = styled(Header)`
color: rgb(37, 56, 52);
`
`;

export const Content = styled.div`
flex-grow: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ const DeletedPage = () => {
deleted: q[1].deleted,
}));

return <HighlightsList title="Deleted" highlights={highlights} bookInfoVisible />;
return (
<HighlightsList
title="Deleted"
highlights={highlights}
bookInfoVisible
/>
);
};

export default DeletedPage;
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ const FavouritesPage = () => {
deleted: q[1].deleted,
}));

return <HighlightsList title="Favourites" highlights={highlights} bookInfoVisible />;
return (
<HighlightsList
title="Favourites"
highlights={highlights}
bookInfoVisible
/>
);
};

export default FavouritesPage;
9 changes: 7 additions & 2 deletions src/app/features/clippings/import/ImportedCount.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React from 'react';
import { Statistic} from 'semantic-ui-react';
import { StatisticValue, StatisticLabel, ImportedCountWrapper } from './ImportedCount.style';
import { Statistic } from 'semantic-ui-react';

import {
ImportedCountWrapper,
StatisticLabel,
StatisticValue,
} from './ImportedCount.style';

const ImportedCount = ({ highlightsStatistics }) => {
return (
Expand Down
1 change: 0 additions & 1 deletion src/app/features/clippings/import/parseClippings.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const parseText = (content) => {
// TODO: for new kindle all locations are read as 'location'
// remove check from `HighlightItem.jsx`


const id = uuidv5(
location + quote + time,
UUID_QUOTES_NAMESPACE,
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout/sidebar/BooksSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const BooksSection = ({ handleItemClick, activeItem }) => {
return (
<BooksSectionWrapper>
<BooksSectionMenu>
<Menu.Item key="searchInput" className='search'>
<Menu.Item key="searchInput" className="search">
<Input
icon={{ name: 'search', circular: true, link: true }}
placeholder="Search book"
Expand Down
8 changes: 3 additions & 5 deletions src/app/layout/sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import { Menu } from 'semantic-ui-react';
import { selectBooksCount } from '../../features/clippings/clippingsSlice';

import { selectBooksCount } from '../../features/clippings/clippingsSlice';
import BooksSection from './BooksSection';
import QuickLinksItem from './QuickLinksItem';
import './Sidebar.css';
Expand All @@ -28,7 +28,7 @@ const Sidebar = () => {
dispatch(setActiveSidebarItem(name));

return (
<MenuStyled vertical role='menu'>
<MenuStyled vertical role="menu">
<Menu.Item>
<Menu.Menu>
<Link to="/">
Expand All @@ -38,9 +38,7 @@ const Sidebar = () => {
activeItem={activeItem}
>
<LibraryBigIcon size={18} /> Books
<Counter>
{booksCount}
</Counter>
<Counter>{booksCount}</Counter>
</QuickLinksItem>
</Link>
<Link to="/import">
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout/sidebar/Sidebar.style.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ export const Counter = styled.div`
border-radius: 8px;
font-size: 14px;
padding: 2px 8px;
`
`;
2 changes: 1 addition & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body {
}

::selection {
background: #dcf0ec;
background: #dcf0ec;
}

code {
Expand Down

0 comments on commit e3773b5

Please sign in to comment.