Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move pages folder under components #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useReactiveVar } from '@apollo/client';
import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { isLoggedInVar } from '../../apollo/cache';
import LoginForm from '../../components/Auth/LoginForm';
import ProgressBar from '../../components/Shared/ProgressBar';
import { NavigationPaths } from '../../constants/shared.constants';
import { isLoggedInVar } from '../../../apollo/cache';
import LoginForm from '../../Auth/LoginForm';
import ProgressBar from '../../Shared/ProgressBar';
import { NavigationPaths } from '../../../constants/shared.constants';

const Login = () => {
const isLoggedIn = useReactiveVar(isLoggedInVar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { Typography } from '@mui/material';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate, useParams } from 'react-router-dom';
import { inviteTokenVar, isLoggedInVar } from '../../apollo/cache';
import { useServerInviteLazyQuery } from '../../apollo/invites/generated/ServerInvite.query';
import { useIsFirstUserQuery } from '../../apollo/users/generated/IsFirstUser.query';
import SignUpForm from '../../components/Auth/SignUpForm';
import ProgressBar from '../../components/Shared/ProgressBar';
import { INVITE_TOKEN } from '../../constants/server-invite.constants';
import { NavigationPaths } from '../../constants/shared.constants';
import { setLocalStorageItem } from '../../utils/shared.utils';
import { inviteTokenVar, isLoggedInVar } from '../../../apollo/cache';
import { useServerInviteLazyQuery } from '../../../apollo/invites/generated/ServerInvite.query';
import { useIsFirstUserQuery } from '../../../apollo/users/generated/IsFirstUser.query';
import SignUpForm from '../../Auth/SignUpForm';
import ProgressBar from '../../Shared/ProgressBar';
import { INVITE_TOKEN } from '../../../constants/server-invite.constants';
import { NavigationPaths } from '../../../constants/shared.constants';
import { setLocalStorageItem } from '../../../utils/shared.utils';

const SignUp = () => {
const isLoggedIn = useReactiveVar(isLoggedInVar);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// TODO: Move text to en.json once documentation is finalized

import { Box, Typography } from '@mui/material';
import DocsDefinitionListItem from '../../components/Docs/DocsDefinitionListItem';
import DocsLink from '../../components/Docs/DocsLink';
import DocsPermissionList from '../../components/Docs/DocsPermissionList';
import DocsSubheading from '../../components/Docs/DocsSubheading';
import LevelOneHeading from '../../components/Shared/LevelOneHeading';
import { NavigationPaths } from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import DocsDefinitionListItem from '../../Docs/DocsDefinitionListItem';
import DocsLink from '../../Docs/DocsLink';
import DocsPermissionList from '../../Docs/DocsPermissionList';
import DocsSubheading from '../../Docs/DocsSubheading';
import LevelOneHeading from '../../Shared/LevelOneHeading';
import { NavigationPaths } from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';

const DocsHomePage = () => {
const isDesktop = useIsDesktop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { truncate } from 'lodash';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { useEditEventLazyQuery } from '../../apollo/events/generated/EditEvent.query';
import EventForm from '../../components/Events/EventForm';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import Card from '../../components/Shared/Card';
import ProgressBar from '../../components/Shared/ProgressBar';
import { TruncationSizes } from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { getEventPath } from '../../utils/event.utils';
import { getGroupEventsTabPath } from '../../utils/group.utils';
import { useEditEventLazyQuery } from '../../../apollo/events/generated/EditEvent.query';
import EventForm from '../../Events/EventForm';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import Card from '../../Shared/Card';
import ProgressBar from '../../Shared/ProgressBar';
import { TruncationSizes } from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { getEventPath } from '../../../utils/event.utils';
import { getGroupEventsTabPath } from '../../../utils/group.utils';

const EditEvent = () => {
const [getEvent, { data, loading, error }] = useEditEventLazyQuery({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { truncate } from 'lodash';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { isLoggedInVar } from '../../apollo/cache';
import { useEventPageLazyQuery } from '../../apollo/events/generated/EventPage.query';
import EventPageCard from '../../components/Events/EventPageCard';
import PostForm from '../../components/Posts/PostForm';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import Feed from '../../components/Shared/Feed';
import ProgressBar from '../../components/Shared/ProgressBar';
import { TruncationSizes } from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { isDeniedAccess } from '../../utils/error.utils';
import { getGroupEventsTabPath } from '../../utils/group.utils';
import { isLoggedInVar } from '../../../apollo/cache';
import { useEventPageLazyQuery } from '../../../apollo/events/generated/EventPage.query';
import EventPageCard from '../../Events/EventPageCard';
import PostForm from '../../Posts/PostForm';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import Feed from '../../Shared/Feed';
import ProgressBar from '../../Shared/ProgressBar';
import { TruncationSizes } from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { isDeniedAccess } from '../../../utils/error.utils';
import { getGroupEventsTabPath } from '../../../utils/group.utils';

const CardContent = styled(MuiCardContent)(() => ({
'&:last-child': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import {
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate, useSearchParams } from 'react-router-dom';
import { isLoggedInVar } from '../../apollo/cache';
import { useEventsLazyQuery } from '../../apollo/events/generated/Events.query';
import { EventsInput } from '../../apollo/gen';
import EventCompact from '../../components/Events/EventCompact';
import LevelOneHeading from '../../components/Shared/LevelOneHeading';
import ProgressBar from '../../components/Shared/ProgressBar';
import { isLoggedInVar } from '../../../apollo/cache';
import { useEventsLazyQuery } from '../../../apollo/events/generated/Events.query';
import { EventsInput } from '../../../apollo/gen';
import EventCompact from '../../Events/EventCompact';
import LevelOneHeading from '../../Shared/LevelOneHeading';
import ProgressBar from '../../Shared/ProgressBar';
import {
NavigationPaths,
TAB_QUERY_PARAM,
} from '../../constants/shared.constants';
} from '../../../constants/shared.constants';

enum EventTabs {
Past = 'past',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { truncate } from 'lodash';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { useEditGroupLazyQuery } from '../../apollo/groups/generated/EditGroup.query';
import GroupForm from '../../components/Groups/GroupForm';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import ProgressBar from '../../components/Shared/ProgressBar';
import { TruncationSizes } from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { getGroupPath } from '../../utils/group.utils';
import { useEditGroupLazyQuery } from '../../../apollo/groups/generated/EditGroup.query';
import GroupForm from '../../Groups/GroupForm';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import ProgressBar from '../../Shared/ProgressBar';
import { TruncationSizes } from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { getGroupPath } from '../../../utils/group.utils';

const EditGroup = () => {
const [getGroup, { data, loading, error }] = useEditGroupLazyQuery();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { truncate } from 'lodash';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { useEditGroupRoleLazyQuery } from '../../apollo/groups/generated/EditGroupRole.query';
import EditRoleTabs from '../../components/Roles/EditRoleTabs';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import ProgressBar from '../../components/Shared/ProgressBar';
import { useEditGroupRoleLazyQuery } from '../../../apollo/groups/generated/EditGroupRole.query';
import EditRoleTabs from '../../Roles/EditRoleTabs';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import ProgressBar from '../../Shared/ProgressBar';
import {
NavigationPaths,
TruncationSizes,
} from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { isDeniedAccess } from '../../utils/error.utils';
import { getGroupPath } from '../../utils/group.utils';
} from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { isDeniedAccess } from '../../../utils/error.utils';
import { getGroupPath } from '../../../utils/group.utils';

const EditGroupRole = () => {
const [getRole, { data, loading, error }] = useEditGroupRoleLazyQuery();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import {
import { truncate } from 'lodash';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { useMemberRequestsLazyQuery } from '../../apollo/groups/generated/MemberRequests.query';
import { isDeniedAccess } from '../../utils/error.utils';
import ProgressBar from '../../components/Shared/ProgressBar';
import { getGroupPath } from '../../utils/group.utils';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import MemberRequest from '../../components/Groups/MemberRequest';
import { TruncationSizes } from '../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { useMemberRequestsLazyQuery } from '../../../apollo/groups/generated/MemberRequests.query';
import { isDeniedAccess } from '../../../utils/error.utils';
import ProgressBar from '../../Shared/ProgressBar';
import { getGroupPath } from '../../../utils/group.utils';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import MemberRequest from '../../Groups/MemberRequest';
import { TruncationSizes } from '../../../constants/shared.constants';
import { useEffect } from 'react';

const CardContent = styled(MuiCardContent)(() => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { truncate } from 'lodash';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { useGroupMembersLazyQuery } from '../../apollo/groups/generated/GroupMembers.query';
import GroupMember from '../../components/Groups/GroupMember';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import ProgressBar from '../../components/Shared/ProgressBar';
import { TruncationSizes } from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { getGroupPath } from '../../utils/group.utils';
import { useGroupMembersLazyQuery } from '../../../apollo/groups/generated/GroupMembers.query';
import GroupMember from '../../Groups/GroupMember';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import ProgressBar from '../../Shared/ProgressBar';
import { TruncationSizes } from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { getGroupPath } from '../../../utils/group.utils';

const CardContent = styled(MuiCardContent)(() => ({
'&:last-child': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { Card, CardContent, Typography } from '@mui/material';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { isLoggedInVar } from '../../apollo/cache';
import { useGroupProfileLazyQuery } from '../../apollo/groups/generated/GroupProfile.query';
import GroupEventsTab from '../../components/Groups/GroupEventsTab';
import GroupProfileCard from '../../components/Groups/GroupProfileCard';
import Feed from '../../components/Shared/Feed';
import ProgressBar from '../../components/Shared/ProgressBar';
import ToggleForms from '../../components/Shared/ToggleForms';
import { isDeniedAccess } from '../../utils/error.utils';
import { isLoggedInVar } from '../../../apollo/cache';
import { useGroupProfileLazyQuery } from '../../../apollo/groups/generated/GroupProfile.query';
import GroupEventsTab from '../../Groups/GroupEventsTab';
import GroupProfileCard from '../../Groups/GroupProfileCard';
import Feed from '../../Shared/Feed';
import ProgressBar from '../../Shared/ProgressBar';
import ToggleForms from '../../Shared/ToggleForms';
import { isDeniedAccess } from '../../../utils/error.utils';

const GroupPage = () => {
const isLoggedIn = useReactiveVar(isLoggedInVar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { truncate } from 'lodash';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { useGroupRolesLazyQuery } from '../../apollo/groups/generated/GroupRoles.query';
import GroupRoleForm from '../../components/Groups/GroupRoles/GroupRoleForm';
import RoleList from '../../components/Roles/RoleList';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import ProgressBar from '../../components/Shared/ProgressBar';
import { TruncationSizes } from '../../constants/shared.constants';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { isDeniedAccess } from '../../utils/error.utils';
import { getGroupPath } from '../../utils/group.utils';
import { useGroupRolesLazyQuery } from '../../../apollo/groups/generated/GroupRoles.query';
import GroupRoleForm from '../../Groups/GroupRoles/GroupRoleForm';
import RoleList from '../../Roles/RoleList';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import ProgressBar from '../../Shared/ProgressBar';
import { TruncationSizes } from '../../../constants/shared.constants';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { isDeniedAccess } from '../../../utils/error.utils';
import { getGroupPath } from '../../../utils/group.utils';

const GroupRoles = () => {
const [getGroupRoles, { data, loading, error }] = useGroupRolesLazyQuery();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Typography } from '@mui/material';
import { truncate } from 'lodash';
import { useTranslation } from 'react-i18next';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { useParams } from 'react-router-dom';
import { isDeniedAccess } from '../../utils/error.utils';
import ProgressBar from '../../components/Shared/ProgressBar';
import { TruncationSizes } from '../../constants/shared.constants';
import { getGroupPath } from '../../utils/group.utils';
import Breadcrumbs from '../../components/Shared/Breadcrumbs';
import GroupSettingsForm from '../../components/Groups/GroupSettingsForm';
import { useGroupSettingsLazyQuery } from '../../apollo/groups/generated/GroupSettings.query';
import { isDeniedAccess } from '../../../utils/error.utils';
import ProgressBar from '../../Shared/ProgressBar';
import { TruncationSizes } from '../../../constants/shared.constants';
import { getGroupPath } from '../../../utils/group.utils';
import Breadcrumbs from '../../Shared/Breadcrumbs';
import GroupSettingsForm from '../../Groups/GroupSettingsForm';
import { useGroupSettingsLazyQuery } from '../../../apollo/groups/generated/GroupSettings.query';
import { useEffect } from 'react';

const GroupSettings = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useReactiveVar } from '@apollo/client';
import { isLoggedInVar } from '../../apollo/cache';
import GroupsList from '../../components/Groups/GroupsList';
import PublicGroupsList from '../../components/Groups/PublicGroupsList';
import { isLoggedInVar } from '../../../apollo/cache';
import GroupsList from '../../Groups/GroupsList';
import PublicGroupsList from '../../Groups/PublicGroupsList';

const GroupsIndex = () => {
const isLoggedIn = useReactiveVar(isLoggedInVar);
Expand Down
6 changes: 3 additions & 3 deletions view/pages/Home.tsx → view/components/Pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useReactiveVar } from '@apollo/client';
import { isLoggedInVar } from '../apollo/cache';
import PublicGroupsFeed from '../components/Groups/PublicGroupsFeed';
import HomeFeed from '../components/Users/HomeFeed';
import { isLoggedInVar } from '../../apollo/cache';
import PublicGroupsFeed from '../Groups/PublicGroupsFeed';
import HomeFeed from '../Users/HomeFeed';

const Home = () => {
const isLoggedIn = useReactiveVar(isLoggedInVar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Typography } from '@mui/material';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate, useParams } from 'react-router-dom';
import { inviteTokenVar, isLoggedInVar } from '../../apollo/cache';
import { useServerInviteLazyQuery } from '../../apollo/invites/generated/ServerInvite.query';
import PublicGroupsFeed from '../../components/Groups/PublicGroupsFeed';
import ProgressBar from '../../components/Shared/ProgressBar';
import { INVITE_TOKEN } from '../../constants/server-invite.constants';
import { NavigationPaths } from '../../constants/shared.constants';
import { setLocalStorageItem } from '../../utils/shared.utils';
import { inviteTokenVar, isLoggedInVar } from '../../../apollo/cache';
import { useServerInviteLazyQuery } from '../../../apollo/invites/generated/ServerInvite.query';
import PublicGroupsFeed from '../../Groups/PublicGroupsFeed';
import ProgressBar from '../../Shared/ProgressBar';
import { INVITE_TOKEN } from '../../../constants/server-invite.constants';
import { NavigationPaths } from '../../../constants/shared.constants';
import { setLocalStorageItem } from '../../../utils/shared.utils';

const ServerInvite = () => {
const isLoggedIn = useReactiveVar(isLoggedInVar);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { useServerInvitesQuery } from '../../apollo/invites/generated/ServerInvites.query';
import ServerInviteCard from '../../components/ServerInvites/ServerInviteCard';
import ServerInviteForm from '../../components/ServerInvites/ServerInviteForm';
import ServerInviteTable from '../../components/ServerInvites/ServerInviteTable';
import LevelOneHeading from '../../components/Shared/LevelOneHeading';
import ProgressBar from '../../components/Shared/ProgressBar';
import { useIsDesktop } from '../../hooks/shared.hooks';
import { isDeniedAccess } from '../../utils/error.utils';
import { useServerInvitesQuery } from '../../../apollo/invites/generated/ServerInvites.query';
import ServerInviteCard from '../../ServerInvites/ServerInviteCard';
import ServerInviteForm from '../../ServerInvites/ServerInviteForm';
import ServerInviteTable from '../../ServerInvites/ServerInviteTable';
import LevelOneHeading from '../../Shared/LevelOneHeading';
import ProgressBar from '../../Shared/ProgressBar';
import { useIsDesktop } from '../../../hooks/shared.hooks';
import { isDeniedAccess } from '../../../utils/error.utils';

const ServerInvites = () => {
const { data, loading, error } = useServerInvitesQuery();
Expand Down
Loading