diff --git a/app/components/empty.js b/app/components/empty.js new file mode 100644 index 00000000..dbd21e6a --- /dev/null +++ b/app/components/empty.js @@ -0,0 +1,74 @@ +import React from 'react' +import styled from 'styled-components' +import Icon from './icon' + +const Main = styled.main` + position: relative; + .skeleton { + position: fixed; + top: 3.5rem; + left: 1.25rem; + width: 232px; + max-width: 100vw; + } + .dotted-lines { + position: absolute; + top: .25rem; + right: 5.5rem; + width: 17rem; + z-index: 3; + } + .create-new-dat, + .link { + position: absolute; + width: 15rem; + color: var(--color-neutral-30); + svg { + display: inline-block; + width: 2rem; + height: 2rem; + } + } + .create-new-dat { + top: 14.5rem; + right: 4rem; + } + .link { + top: 6rem; + right: 8.5rem; + svg { + margin-bottom: -.75rem; + } + } +` + +const Empty = () => ( +
+ +
+ +
+ +

+ Download A Dat +

+

+ … and keep data up-to-date +
+ by entering the link here. +

+
+
+ +

Share a Folder

+

+ … and sync changes by sharing +
+ the link with someone else. +

+
+
+
+) + +export default Empty \ No newline at end of file diff --git a/app/components/table.js b/app/components/table.js index 7b6f792c..27380e40 100644 --- a/app/components/table.js +++ b/app/components/table.js @@ -3,6 +3,7 @@ import React from 'react' import styled from 'styled-components' import TableRow from './table-row' +import Empty from './empty' const StyledTable = styled.table` width: 100%; @@ -39,26 +40,30 @@ const StyledTable = styled.table` } ` -const Table = ({ dats, shareDat, onDeleteDat }) => ( -
- - - - - Link - Status - Size - Peers - - - - - {Object.keys(dats).map(key => ( - - ))} - - -
-) +const Table = ({ dats, shareDat, onDeleteDat }) => { + if (!Object.keys(dats).length) return + + return ( +
+ + + + + Link + Status + Size + Peers + + + + + {Object.keys(dats).map(key => ( + + ))} + + +
+ ) +} export default Table