Structured files better.

This commit is contained in:
Martin Sosic 2020-11-30 18:11:40 +01:00
parent c1615656ad
commit 3877ef27e9
10 changed files with 22 additions and 20 deletions

View File

@ -3,13 +3,13 @@ import { Link } from 'react-router-dom'
import _ from 'lodash'
import useAuth from '@wasp/auth/useAuth.js'
import { useQuery } from '@wasp/queries'
import getTags from '@wasp/queries/getTags'
import getFollowedArticles from '@wasp/queries/getFollowedArticles'
import getAllArticles from '@wasp/queries/getAllArticles'
import { useQuery } from '@wasp/queries'
import Navbar from './Navbar'
import ArticleListPaginated from './ArticleListPaginated'
import ArticleListPaginated from './article/components/ArticleListPaginated'
const MainPage = () => {
const { data: me } = useAuth()
@ -39,7 +39,6 @@ const MainPage = () => {
pageSize={2}
/>
</div>
</div>
)
}

View File

@ -3,12 +3,13 @@ import { Link, useHistory } from 'react-router-dom'
import useAuth from '@wasp/auth/useAuth.js'
import logout from '@wasp/auth/logout.js'
import { useQuery } from '@wasp/queries'
import createArticle from '@wasp/actions/createArticle'
import updateArticle from '@wasp/actions/updateArticle'
import { useQuery } from '@wasp/queries'
import getArticle from '@wasp/queries/getArticle'
import Navbar from './Navbar'
import Navbar from '../../Navbar'
const ArticleEditorPage = (props) => {
const { data: user, isError } = useAuth({ keepPreviousData: true })

View File

@ -4,7 +4,7 @@ import moment from 'moment'
import setArticleFavorited from '@wasp/actions/setArticleFavorited'
import smileyImageUrl from './smiley.jpg'
import smileyImageUrl from '../../smiley.jpg'
const ArticleList = (props) => {
const articles = props.articles

View File

@ -2,6 +2,7 @@ import React, { useState } from 'react'
import PropTypes from 'prop-types'
import { useQuery } from '@wasp/queries'
import ArticleList from './ArticleList'
const ArticleListPaginated = (props) => {

View File

@ -14,7 +14,7 @@ import deleteArticle from '@wasp/actions/deleteArticle'
import createComment from '@wasp/actions/createComment'
import deleteComment from '@wasp/actions/deleteComment'
import Navbar from './Navbar'
import Navbar from '../../Navbar'
const ArticleViewPage = (props) => {
const history = useHistory()

View File

@ -2,15 +2,15 @@ import React, { useState } from 'react'
import { Link, useHistory } from 'react-router-dom'
import useAuth from '@wasp/auth/useAuth.js'
import { useQuery } from '@wasp/queries'
import getUser from '@wasp/queries/getUser'
import getArticlesByUser from '@wasp/queries/getArticlesByUser'
import getFavoritedArticles from '@wasp/queries/getFavoritedArticles'
import followUser from '@wasp/actions/followUser'
import { useQuery } from '@wasp/queries'
import Navbar from './Navbar'
import ArticleListPaginated from './ArticleListPaginated'
import smileyImageUrl from './smiley.jpg'
import Navbar from '../../Navbar'
import ArticleListPaginated from '../../article/components/ArticleListPaginated'
import smileyImageUrl from '../../smiley.jpg'
const UserProfilePage = (props) => {
const history = useHistory()

View File

@ -3,9 +3,10 @@ import { Link, useHistory } from 'react-router-dom'
import useAuth from '@wasp/auth/useAuth.js'
import logout from '@wasp/auth/logout.js'
import updateUser from '@wasp/actions/updateUser'
import Navbar from './Navbar'
import Navbar from '../../Navbar'
const UserSettingsPage = () => {
const { data: user, isError } = useAuth({ keepPreviousData: true })

View File

@ -9,32 +9,32 @@ page Main {
route "/login" -> page Login
page Login {
component: import Login from "@ext/LoginPage.js"
component: import Login from "@ext/auth/LoginPage.js"
}
route "/register" -> page Signup
page Signup {
component: import Signup from "@ext/SignupPage.js"
component: import Signup from "@ext/auth/SignupPage.js"
}
route "/settings" -> page UserSettings
page UserSettings {
component: import UserSettings from "@ext/UserSettingsPage.js"
component: import UserSettings from "@ext/user/components/UserSettingsPage.js"
}
route "/@:username" -> page UserProfile
page UserProfile {
component: import UserProfile from "@ext/UserProfilePage.js"
component: import UserProfile from "@ext/user/components/UserProfilePage.js"
}
route "/editor/:articleSlug?" -> page ArticleEditor
page ArticleEditor {
component: import ArticleEditor from "@ext/ArticleEditorPage.js"
component: import ArticleEditor from "@ext/article/components/ArticleEditorPage.js"
}
route "/article/:articleSlug" -> page ArticleView
page ArticleView {
component: import ArticleView from "@ext/ArticleViewPage.js"
component: import ArticleView from "@ext/article/components/ArticleViewPage.js"
}
entity User {=psl