Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit d833ceb

Browse files
committed
fix: Errors on Submit pageP
1 parent 2968cfe commit d833ceb

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

components/maker/styled.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ export const MakerContainer = ({ children }) => (
5454
</Flex>
5555
)
5656

57+
export const MakerTitle = styled(Type.h2)`
58+
display: block;
59+
font-weight: 500;
60+
font-size: 24px;
61+
line-height: 28px;
62+
color: #0F1117;
63+
margin-bottom: 16px;
64+
`
5765

5866
export const MakerCardHeader = styled(Type.h2)`
5967
font-weight: 500;

pages/submit.js

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { connect } from 'react-redux'
44
import Head from '@containers/head'
55
import Link from 'next/link'
66
import { bindActionCreators } from 'redux'
7+
import { MakerTitle, MakerCardHeader, MakerCardText, MakerButton, MakerField } from '@components/maker/styled'
78
import { Page } from '@components/page'
89
import { Type, Field, Flex, Box, Button } from 'blockstack-ui'
910
import { selectAppConstants, selectApiServer } from '@stores/apps/selectors'
10-
import { string, boolean } from 'yup'
1111
import { FormSection, ErrorMessage, Bar, sections as getSections } from '@containers/submit'
1212
import debounce from 'lodash.debounce'
1313
import UserStore from '@stores/user'
@@ -92,13 +92,8 @@ const Submit = ({ appConstants, setState, state, errors, submit, user, loading,
9292

9393
return (
9494
<Box mx="auto" maxWidth={700}>
95-
<Type is="h2">Add an app to App.co</Type>
96-
<Type is="p" lineHeight={1.5}>
97-
Add any user-ready decentralized app: It could be an app you built, or an app you discovered. We manually
98-
verify all information before publishing to App.co. Contact details are not displayed and we promise to keep
99-
your information private and safe.
100-
</Type>
101-
<Bar mb={0} />
95+
<MakerTitle pt="20px">Submit your app</MakerTitle>
96+
<MakerCardHeader>Personal details</MakerCardHeader>
10297
{user && user.user && (
10398
<Flex pt={6}>
10499
<Box mb={4} width={1}>
@@ -121,30 +116,27 @@ const Submit = ({ appConstants, setState, state, errors, submit, user, loading,
121116
)}
122117
<Flex flexWrap="wrap" pt={6} flexDirection="column">
123118
<form noValidate onSubmit={handleValidation}>
124-
{sections.map((section) => (
125-
<>
126-
<FormSection
127-
errors={errors}
128-
handleChange={outerHandleChange}
129-
setState={setState}
130-
key={`section-${section.fields[0].name}`}
131-
message={section.message}
132-
fields={section.fields}
133-
state={state}
134-
/>
135-
<Bar />
136-
</>
119+
{sections.map(section => (
120+
<FormSection
121+
errors={errors}
122+
handleChange={outerHandleChange}
123+
setState={setState}
124+
key={`section-${section.fields[0].name}`}
125+
message={section.message}
126+
fields={section.fields}
127+
state={state}
128+
/>
137129
))}
138130
{errors ? <ErrorMessage /> : null}
139131
{!(user && user.jwt) ? (
140132
<>
141133
<Field.Message maxWidth={400} lineHeight={1.5} mb={3}>
142134
To submit your app, first login with Blockstack. You&apos;ll be able to use your Blockstack ID to manage your app&apos;s listing.
143135
</Field.Message>
144-
<Button onClick={blockstackAuth}>{loading ? 'Loading...' : 'Login with Blockstack'}</Button>
136+
<MakerButton onClick={blockstackAuth}>{loading ? 'Loading...' : 'Login with Blockstack'}</MakerButton>
145137
</>
146138
) : (
147-
<Button>{loading ? 'Loading...' : 'Submit App'}</Button>
139+
<MakerButton>{loading ? 'Loading...' : 'Submit App'}</MakerButton>
148140
)}
149141
</form>
150142
</Flex>
@@ -258,12 +250,13 @@ class SubmitDapp extends React.Component {
258250
}
259251

260252
render() {
253+
// return <div>lkjsdflkjsdlfkjs</div>
261254
const { appConstants } = this.props
262255

263256
return (
264-
<Page>
257+
<Page innerPadding={0} pt={0}>
265258
<Head title="Submit your dapp" description="Submit your dapp to be listed on the Universal Dapp Store." />
266-
<Page.Section wrap p={['32px', '64px']} mb={3} richText bg="white">
259+
<Page.Section p={['32px', '64px']} mb={3} bg="white">
267260
{this.state.success ? (
268261
<>
269262
<Box width="100%" textAlign="center">

0 commit comments

Comments
 (0)