Skip to content

Commit

Permalink
implement sample nda
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaqiuxy committed Jul 11, 2020
1 parent f5812b2 commit 4680fcc
Show file tree
Hide file tree
Showing 8 changed files with 481 additions and 15 deletions.
7 changes: 6 additions & 1 deletion src/components/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ const RecipientInfoText = styled.div`

const TypeAndStatusRow = styled.div`
display: flex;
flex-direction: column;
@media screen and (min-width: 576px) {
flex-direction: row;
}
`;

const TypeContainer = styled.div`
Expand Down Expand Up @@ -372,7 +377,7 @@ const Dashboard = ({
ndaType={
ndaTemplateOptions.find(
(option) => option.ndaTemplateId === nda.metadata.ndaTemplateId,
).label
).data.title
}
/>
))
Expand Down
65 changes: 64 additions & 1 deletion src/components/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,38 @@ const FieldLabel = styled.label`
}
`;

const SiteMapNavigation = styled.nav`
padding: 0;
margin: 0;
margin-bottom: 2pc;
justify-content: center;
display: flex;
align-items: center;
flex-direction: column;
`;

const SiteMapNavigationItem = styled.span`
font-weight: 200;
font-size: 16px;
color: var(--ndaify-fg);
list-style-type: none;
padding: 4px;
text-align: center;
@media screen and (min-width: 576px) {
width: auto;
}
& a {
color: inherit;
}
& a:visited {
color: inherit;
}
`;

const secretLinkInputPlaceholder = defineMessage({
id: 'secret-link-input-placeholder',
defaultMessage: 'Paste a secret link',
Expand All @@ -309,6 +341,7 @@ const secretLinkInputPlaceholder = defineMessage({
const Home = ({
user,
ndaStatistics,
ndaTemplateOptions,
refSource,
}) => {
const intl = useIntl();
Expand Down Expand Up @@ -691,7 +724,37 @@ const Home = ({

<PageContainer>
<ContentContainer>
<Footer />
<Footer
renderContent={() => {
const activeNdas = ndaTemplateOptions.filter((opt) => opt.active);

if (activeNdas.length === 0) {
return null;
}

return (
<SiteMapNavigation>
{
activeNdas.map((opt) => (
<SiteMapNavigationItem
key={opt.ndaTemplateId}
>
<Link passHref href="/sample/[...slug]" as={`sample/${opt.ndaTemplateId}`}>
<a>
Sample
{' '}
{opt.data.title}
{' '}
Template
</a>
</Link>
</SiteMapNavigationItem>
))
}
</SiteMapNavigation>
);
}}
/>
</ContentContainer>
</PageContainer>
</Container>
Expand Down
Loading

0 comments on commit 4680fcc

Please sign in to comment.