mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-24 03:35:17 +03:00
Structured files better.
This commit is contained in:
parent
c1615656ad
commit
3877ef27e9
@ -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>
|
||||
)
|
||||
}
|
||||
|
@ -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 })
|
@ -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
|
@ -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) => {
|
@ -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()
|
@ -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()
|
@ -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 })
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user