mirror of
https://github.com/comatory/fb2iCal
synced 2025-03-03 02:47:40 +01:00
improvement: add a code split when event is fetched
The code for parsing HTML is isomorphic and runs on server as well. Unfortunately it brings lot of dependencies and I will try to minimize the initial load of the app.
This commit is contained in:
parent
0f7d57afa0
commit
f052a66421
@ -21,7 +21,6 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { createEvent } from '../actions'
|
||||
import logger from '../services/logger'
|
||||
|
||||
export let error
|
||||
@ -38,15 +37,20 @@
|
||||
pending ? 'input--pending': '',
|
||||
].join(' ')
|
||||
|
||||
const handleSubmit = (e) => {
|
||||
const handleSubmit = async (e) => {
|
||||
if (!form.reportValidity()) {
|
||||
return
|
||||
}
|
||||
|
||||
e.preventDefault()
|
||||
|
||||
createEvent(value, { logger })
|
||||
value = ''
|
||||
try {
|
||||
const module = await import('../actions')
|
||||
module.createEvent(value, { logger })
|
||||
value = ''
|
||||
} catch (importError) {
|
||||
console.error(importError)
|
||||
}
|
||||
}
|
||||
|
||||
const handleChange = (e) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user