Skip to content

Commit 102c882

Browse files
authored
Merge pull request #658 from kaizumaki/feature/fix-type
typeを追加(nuxt generateのエラー対応)
2 parents faf4204 + 478e33a commit 102c882

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

src/pages/user/signup.vue

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,28 @@ import BaseActionButton from '@/components/BaseActionButton.vue'
9292
import BaseInputField from '@/components/BaseInputField.vue'
9393
import { withSSRContext } from 'aws-amplify'
9494
95-
export default Vue.extend({
95+
type Data = {
96+
name: string
97+
email: string
98+
password: string
99+
confirmation: string
100+
error: boolean
101+
completion: boolean
102+
loading: boolean
103+
}
104+
105+
type Methods = {
106+
doSignUp(): Promise<void>
107+
}
108+
109+
type Computed = {
110+
passwordConfirm: string
111+
disableRegisterButton: boolean
112+
}
113+
114+
type Props = {}
115+
116+
export default Vue.extend<Data, Methods, Computed, Props>({
96117
components: { BaseBottomSheetLayer, BaseActionButton, BaseInputField },
97118
layout: 'background',
98119
data() {
@@ -131,16 +152,13 @@ export default Vue.extend({
131152
}
132153
const reg = /[ -~]{6,}$/
133154
const response = reg.test(this.password)
134-
if (!response) {
135-
return true
136-
}
137-
return false
155+
return !response
138156
}
139157
return true
140158
},
141159
},
142160
methods: {
143-
async doSignUp(): Promise<void> {
161+
async doSignUp() {
144162
this.loading = true
145163
const { Auth } = withSSRContext()
146164
await Auth.signUp({

0 commit comments

Comments
 (0)