diff --git a/.babelrc b/.babelrc deleted file mode 100644 index d8c8ff4..0000000 --- a/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - "next/babel", - ], - "plugins": [ - ["babel-plugin-inline-import", { - "extensions": [ - ".csv", - ] - }] - ], -} diff --git a/components/Bar/Bar.js b/components/Bar/Bar.js deleted file mode 100644 index 6b5cf25..0000000 --- a/components/Bar/Bar.js +++ /dev/null @@ -1,32 +0,0 @@ -export const Bar = ({ children }) => ( -
- {children} - -
-) - -export default Bar; diff --git a/components/Bar/index.js b/components/Bar/index.js deleted file mode 100644 index 11c7e78..0000000 --- a/components/Bar/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Bar } from './Bar'; - -export default Bar; diff --git a/components/Breakdown/BreakdownList.js b/components/Breakdown/BreakdownList.js deleted file mode 100644 index 501607f..0000000 --- a/components/Breakdown/BreakdownList.js +++ /dev/null @@ -1,39 +0,0 @@ -import { BreakdownItem } from './BreakdownItem'; - -export const BreakdownList = ({ items }) => { - return ( - - ) -} - -export default BreakdownList diff --git a/components/Footer/index.js b/components/Footer/index.js deleted file mode 100644 index dc423da..0000000 --- a/components/Footer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Footer } from './Footer'; - -export default Footer; diff --git a/components/Intro/Intro.js b/components/Intro/Intro.js deleted file mode 100644 index caf43b5..0000000 --- a/components/Intro/Intro.js +++ /dev/null @@ -1,38 +0,0 @@ -import { compose } from 'ramda'; -import { SVGIcon } from '../'; -import {formatShortDate} from '../../utils/dates'; - -export const Intro = ({ startedOn, lastUpdated, total}) => ( -
- - - - -

- Last workout on {formatShortDate(lastUpdated)} -

- - -
-) - -export default Intro diff --git a/components/Intro/index.js b/components/Intro/index.js deleted file mode 100644 index c6130ab..0000000 --- a/components/Intro/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Intro } from './Intro'; - -export default Intro; diff --git a/components/Page/Page.js b/components/Page/Page.js deleted file mode 100644 index 7ae9502..0000000 --- a/components/Page/Page.js +++ /dev/null @@ -1,33 +0,0 @@ -export const Page = ({ children }) => ( -
- {children} - -
-) - -export default Page; diff --git a/components/Page/PageLinks.js b/components/Page/PageLinks.js deleted file mode 100644 index adfdb67..0000000 --- a/components/Page/PageLinks.js +++ /dev/null @@ -1,20 +0,0 @@ -import { Bar } from '../'; - -export const PageLinks = () => ( - -

View on Github

- - -
-) - -export default PageLinks; diff --git a/components/Page/PageSection.js b/components/Page/PageSection.js deleted file mode 100644 index cc422dc..0000000 --- a/components/Page/PageSection.js +++ /dev/null @@ -1,12 +0,0 @@ -export const PageSection = ({ children }) => ( -
- {children} - -
-) - -export default PageSection; diff --git a/components/Page/index.js b/components/Page/index.js deleted file mode 100644 index f859d30..0000000 --- a/components/Page/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Page } from './Page'; -import { PageSection } from './PageSection'; -import { PageLinks } from './PageLinks'; - -Page.Section = PageSection; -Page.Links = PageLinks; - -export default Page; diff --git a/components/SVGIcon/Dench.js b/components/SVGIcon/Dench.js deleted file mode 100644 index b41b348..0000000 --- a/components/SVGIcon/Dench.js +++ /dev/null @@ -1,20 +0,0 @@ -import { iconDefaultProps, iconPropTypes } from './PropTypes'; - -const Dench = ({ width, height }) => ( - - - - - - - - - - -); - -Dench.displayName = 'Mooji.SVGIcon.Dench'; -Dench.propTypes = iconPropTypes; -Dench.defaultProps = iconDefaultProps; - -export default Dench; diff --git a/components/SVGIcon/Mais.js b/components/SVGIcon/Mais.js deleted file mode 100644 index 79b2c29..0000000 --- a/components/SVGIcon/Mais.js +++ /dev/null @@ -1,18 +0,0 @@ -import { iconDefaultProps, iconPropTypes } from './PropTypes'; - -const Mais = ({ width, height }) => ( - - - - - - - - -); - -Mais.displayName = 'Mooji.SVGIcon.Mais'; -Mais.propTypes = iconPropTypes; -Mais.defaultProps = iconDefaultProps; - -export default Mais; diff --git a/components/SVGIcon/index.js b/components/SVGIcon/index.js deleted file mode 100644 index 2fbaade..0000000 --- a/components/SVGIcon/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import SVGIcon from './SVGIcon'; - -import Dench from './Dench'; -import Mais from './Mais'; -import KeyRight from './KeyRight'; - -SVGIcon.Dench = Dench; -SVGIcon.KeyRight = KeyRight; -SVGIcon.Mais = Mais; - -export default SVGIcon; diff --git a/components/ShortDate/ShortDate.js b/components/ShortDate/ShortDate.js deleted file mode 100644 index 5983817..0000000 --- a/components/ShortDate/ShortDate.js +++ /dev/null @@ -1,7 +0,0 @@ -import {formatShortDate} from '../../utils/dates'; - -export const ShortDate = ({ date }) => ( - {formatShortDate(date)} -) - -export default ShortDate; diff --git a/components/ShortDate/index.js b/components/ShortDate/index.js deleted file mode 100644 index ab6e985..0000000 --- a/components/ShortDate/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { ShortDate } from './ShortDate'; - -export default ShortDate; diff --git a/components/index.js b/components/index.js deleted file mode 100644 index c76048d..0000000 --- a/components/index.js +++ /dev/null @@ -1,15 +0,0 @@ -export { default as Bar } from './Bar'; - -export { default as BreakdownList } from './Breakdown'; - -export { default as Footer } from './Footer'; - -export { default as Head } from './Head'; - -export { default as Intro } from './Intro'; - -export { default as Page } from './Page'; - -export { default as ShortDate } from './ShortDate'; - -export { default as SVGIcon } from './SVGIcon'; diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000..9bc3dd4 --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,6 @@ +/// +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/next.config.js b/next.config.js deleted file mode 100644 index ab34276..0000000 --- a/next.config.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - webpack: (config) => { - // Fixes npm packages that depend on `fs` module - config.node = { - fs: 'empty' - } - - return config - } -} diff --git a/package.json b/package.json index 0837873..d5d8088 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dench", - "version": "0.1.0", + "version": "1.0.0", "description": "A simple breakdown for workout data from Stronglifts 5x5.", "scripts": { "dev": "next", @@ -17,16 +17,17 @@ "classnames": "^2.2.5", "d3": "^4.9.1", "d3-array": "^1.2.0", - "fecha": "^2.3.1", - "next": "^2.4.0", + "d3-dsv": "^3.0.1", + "dayjs": "^1.10.7", + "next": "^12.0.2", "prop-types": "^15.5.10", "ramda": "^0.23.0", - "react": "^15.5.4", - "react-dom": "^15.5.4", - "slug": "^0.9.1", - "uuid": "^3.0.1" + "react": "^17.0.2", + "react-dom": "^17.0.2" }, "devDependencies": { - "babel-plugin-inline-import": "^2.0.4" + "@types/d3-dsv": "^3.0.0", + "@types/react": "^17.0.34", + "typescript": "^4.4.4" } } diff --git a/pages/index.js b/pages/index.js deleted file mode 100644 index 606a361..0000000 --- a/pages/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import getData from '../utils/getData'; -import data from '../data/spreadsheet.stronglifts.csv'; - -import { Bar, Footer, Head, Intro, Page, BreakdownList, ShortDate } from '../components'; - -export const Index = ({ startedOn, lastUpdated, totalWorkouts, exercises }) => ( - - - - -

A simple breakdown of {totalWorkouts} workouts since .

-
- - - - - - - - -