[www] minor refactoring and remove console.log
This commit is contained in:
1 parent
0ebf8c7185
commit
c9a24c008b
4 files changed
+1
-26
No files matched your search
@@ -71,13 +71,7 @@ const Group = ({day, dayIndex}) => (
|
||||
|
||||
const Cell = ({course, teacher, time}) => (
|
||||
<div className="schedule-table__course">
|
||||
|
||||
{
|
||||
console.log(time)
|
||||
}
|
||||
|
||||
<Lesson {...course}/>
|
||||
|
||||
<Teacher {...teacher}/>
|
||||
|
||||
{time
|
||||
|
||||
+1
-3
@@ -47,7 +47,7 @@ class Image {
|
||||
|
||||
const a = this.getArtifact(size)
|
||||
const a2 = this.getArtifact(retinaSize)
|
||||
const pic = {
|
||||
return {
|
||||
src: a.url,
|
||||
width: a.width,
|
||||
height: a.height,
|
||||
@@ -58,8 +58,6 @@ class Image {
|
||||
}
|
||||
]
|
||||
}
|
||||
console.log(pic)
|
||||
return pic
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
function redirectFragment() {
|
||||
return async (ctx, next) => {
|
||||
const query = ctx.query
|
||||
|
||||
console.log(query)
|
||||
|
||||
if ('_escaped_fragment_' in query) {
|
||||
ctx.redirect(ctx.path)
|
||||
} else {
|
||||
await next()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = redirectFragment
|
||||
@@ -16,7 +16,6 @@ import handlebars from 'handlebars'
|
||||
|
||||
const {sessionConfig, view404} = require('./config')
|
||||
const error = require('./middlewares/error')
|
||||
const redirectFragment = require('./middlewares/redirectFragment')
|
||||
const redirect = require('./middlewares/redirect')
|
||||
const home = require('./routes/home')
|
||||
const article = require('./routes/articles')
|
||||
@@ -65,7 +64,6 @@ export default function (config) {
|
||||
|
||||
app.use(error.notFound(view404))
|
||||
app.use(sitemap())
|
||||
app.use(redirectFragment())
|
||||
|
||||
app.use(home.getHome(config.articlesPerPage))
|
||||
app.use(gallery.getGallery())
|
||||
|
||||
Reference in new issue
Block a user