Skip to content

Commit

Permalink
consistent directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
thejessewinton committed Mar 4, 2024
1 parent d2dd09b commit 04c1a04
Show file tree
Hide file tree
Showing 59 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"db:push": "prisma db push",
"db:studio": "prisma studio",
"dev": "next dev",
"generate:svg": "npx @svgr/cli --no-index --out-dir src/app/_svg -- src/svg",
"generate:svg": "npx @svgr/cli --no-index --out-dir src/app/components/svg -- src/svg",
"postinstall": "prisma generate",
"lint": "next lint",
"start": "next start"
Expand Down
4 changes: 2 additions & 2 deletions src/app/(auth)/sign-in/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { type Metadata } from 'next'
import { getProviders } from 'next-auth/react'
import { redirect } from 'next/navigation'
import Logo from '~/app/_svg/logo'
import Logo from '~/components/svg/logo'
import { getServerAuthSession } from '~/server/auth'
import { SignInButtons } from './_components/sign-in-buttons'
import { SignInButtons } from '~/components/sign-in-buttons'

export const metadata: Metadata = {
title: 'Sign In - Beam',
Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/new/_components/post-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as React from 'react'
import { Controller, useForm } from 'react-hook-form'
import { TextField } from '~/app/_components/text-field'
import { Button } from '~/app/_components/button'
import MarkdownIcon from '~/app/_svg/markdown-icon'
import MarkdownIcon from '~/components/svg/markdown-icon'
import { MarkdownEditor } from '~/app/_components/markdown-editor'
import { useRouter } from 'next/navigation'
import { api } from '~/trpc/react'
Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/post/[id]/edit/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getServerAuthSession } from '~/server/auth'
import { api } from '~/trpc/server'

import { EditPostForm } from '../_components/edit-post-form'
import { EditPostForm } from '~/components/edit-post-form'

type ProfilePageParams = {
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
AlertDialogCancel,
} from '~/app/_components/alert-dialog'
import { TextField } from '~/app/_components/text-field'
import { useDialogStore } from '~/app/_hooks/use-dialog-store'
import EditIcon from '~/app/_svg/edit-icon'
import { useDialogStore } from '~/hooks/use-dialog-store'
import EditIcon from '~/components/svg/edit-icon'
import { api } from '~/trpc/react'
import { type RouterOutputs } from '~/trpc/shared'
import { env } from '~/env'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
} from '~/app/_components/alert-dialog'
import { Avatar } from '~/app/_components/avatar'
import { Button } from '~/app/_components/button'
import { useDialogStore } from '~/app/_hooks/use-dialog-store'
import EditIcon from '~/app/_svg/edit-icon'
import { useDialogStore } from '~/hooks/use-dialog-store'
import EditIcon from '~/components/svg/edit-icon'
import { uploadImage } from '~/server/cloudinary'
import { api } from '~/trpc/react'

Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/profile/[userId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DotPattern from '~/app/_svg/dot-pattern'
import DotPattern from '~/components/svg/dot-pattern'

import { getServerAuthSession } from '~/server/auth'
import { api } from '~/trpc/server'
Expand Down
10 changes: 5 additions & 5 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { cookies } from 'next/headers'

import { TRPCReactProvider } from '~/trpc/react'
import { classNames } from '~/utils/core'
import { ThemeProvider } from '~/app/_providers/theme'
import { Toaster } from '~/app/_providers/toaster'
import { ThemeProvider } from '~/providers/theme'
import { Toaster } from '~/providers/toaster'

import { SearchDialog } from './_components/search-dialog'
import { AlertDialog } from './_components/alert-dialog'
import { SearchDialog } from '~/components/search-dialog'
import { AlertDialog } from '~/components/alert-dialog'
import { getServerAuthSession } from '~/server/auth'
import { SessionProvider } from './_providers/auth'
import { SessionProvider } from '~/providers/auth'

const inter = localFont({
variable: '--font-sans',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { type Session } from 'next-auth'
import { Button } from './button'
import { ProfileMenu } from './profile-menu'
import { useSearchStore } from '~/app/_hooks/use-search-store'
import SearchIcon from '../_svg/search-icon'
import { useSearchStore } from '~/hooks/use-search-store'
import SearchIcon from '~/components/svg/search-icon'

export const Actions = ({ session }: { session: Session | null }) => {
const { toggleOpen } = useSearchStore()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'
import * as React from 'react'
import XIcon from '../_svg/x-icon'
import XIcon from '~/components/svg/x-icon'
import { useDialogStore } from '../_hooks/use-dialog-store'
import { type ReactNode } from 'react'
import { classNames } from '~/utils/core'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { cva, type VariantProps } from 'class-variance-authority'
import Link, { type LinkProps } from 'next/link'

import { classNames } from '~/utils/core'
import Spinner from '../_svg/spinner'
import Spinner from '~/components/svg/spinner'

const button = cva(
'inline-flex items-center justify-center font-semibold transition-colors rounded-full focus-ring px-4 text-sm h-8',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
MenuItem,
MenuItemsContent,
} from './menu'
import DotsIcon from '../_svg/dots-icon'
import DotsIcon from '~/components/svg/dots-icon'
import { Button } from './button'
import { HtmlView } from './html-view'
import { api } from '~/trpc/react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as DialogPrimitive from '@radix-ui/react-dialog'
import * as React from 'react'
import XIcon from '../_svg/x-icon'
import XIcon from '~/components/svg/x-icon'
import { useDialogStore } from '../_hooks/use-dialog-store'
import { type ReactNode } from 'react'
import { classNames } from '~/utils/core'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import * as React from 'react'
import { Controller, useForm } from 'react-hook-form'
import { TextField } from '~/app/_components/text-field'
import { Button } from '~/app/_components/button'
import MarkdownIcon from '~/app/_svg/markdown-icon'
import { MarkdownEditor } from '~/app/_components/markdown-editor'
import { TextField } from '~/components/text-field'
import { Button } from '~/components/button'
import MarkdownIcon from '~/components/svg/markdown-icon'
import { MarkdownEditor } from '~/components/markdown-editor'

import { api } from '~/trpc/react'
import { useRouter } from 'next/navigation'
Expand Down
4 changes: 2 additions & 2 deletions src/app/_components/footer.tsx → src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import GithubLogo from '../_svg/github-logo'
import HeartFilledIcon from '../_svg/heart-filled-icon'
import GithubLogo from '~/components/svg/github-logo'
import HeartFilledIcon from '~/components/svg/heart-filled-icon'

export const Footer = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from 'next/link'
import Logo from '../_svg/logo'
import Logo from '~/components/svg/logo'
import { getServerAuthSession } from '~/server/auth'

import { Actions } from './actions'
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import TextareaMarkdown, {
type TextareaMarkdownRef,
} from 'textarea-markdown-editor'

import BoldIcon from '../_svg/bold-icon'
import BoldIcon from '~/components/svg/bold-icon'
import { classNames } from '~/utils/core'
import ItalicIcon from '../_svg/italic-icon'
import LinkIcon from '../_svg/link-icon'
import ListIcon from '../_svg/list-icon'
import ItalicIcon from '~/components/svg/italic-icon'
import LinkIcon from '~/components/svg/link-icon'
import ListIcon from '~/components/svg/list-icon'
import { HtmlView } from './html-view'
import { type SuggestionType, getSuggestionData } from '~/utils/suggestion'
import { env } from '~/env'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import { usePathname } from 'next/navigation'
import { Button } from './button'
import ChevronLeftIcon from '../_svg/chevron-left-icon'
import ChevronRightIcon from '../_svg/chevron-right-icon'
import ChevronLeftIcon from '~/components/svg/chevron-left-icon'
import ChevronRightIcon from '~/components/svg/chevron-right-icon'

type PaginationProps = {
itemCount: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useRouter } from 'next/navigation'
import { toast } from 'react-hot-toast'
import { Button } from '~/app/_components/button'
import { Button } from '~/components/button'
import {
AlertDialogAction,
AlertDialogActions,
Expand All @@ -11,7 +11,7 @@ import {
AlertDialogDescription,
AlertDialogTitle,
AlertDialogCancel,
} from '~/app/_components/alert-dialog'
} from '~/components/alert-dialog'
import {
Menu,
MenuButton,
Expand All @@ -20,12 +20,12 @@ import {
MenuItem,
MenuItemsContent,
MenuItemLink,
} from '~/app/_components/menu'
import { useDialogStore } from '~/app/_hooks/use-dialog-store'
import DotsIcon from '~/app/_svg/dots-icon'
import EditIcon from '~/app/_svg/edit-icon'
import EyeIcon from '~/app/_svg/eye-icon'
import TrashIcon from '~/app/_svg/trash-icon'
} from '~/components/menu'
import { useDialogStore } from '~/hooks/use-dialog-store'
import DotsIcon from '~/components/svg/dots-icon'
import EditIcon from '~/components/svg/edit-icon'
import EyeIcon from '~/components/svg/eye-icon'
import TrashIcon from '~/components/svg/trash-icon'
import { api } from '~/trpc/react'

type PostActionProps = {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { classNames } from '~/utils/core'
import { formatDistanceToNow } from 'date-fns/formatDistanceToNow'
import { AuthorWithDate } from '~/app/_components/author-with-date'
import { HtmlView } from '~/app/_components/html-view'
import ChevronRightIcon from '~/app/_svg/chevron-right-icon'
import MessageIcon from '~/app/_svg/message-icon'
import ChevronRightIcon from '~/components/svg/chevron-right-icon'
import MessageIcon from '~/components/svg/message-icon'

import { ReactionButton } from './reaction-button'
import { Suspense } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AuthorWithDate } from './author-with-date'
import { HtmlView } from './html-view'
import { ReactionButton } from './reaction-button'
import { Button } from './button'
import MessageIcon from '../_svg/message-icon'
import MessageIcon from '~/components/svg/message-icon'
import { Suspense } from 'react'

type PostViewProps = {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import { classNames } from '~/utils/core'
import { Button } from './button'
import HeartFilledIcon from '../_svg/heart-filled-icon'
import HeartIcon from '../_svg/heart-icon'
import HeartFilledIcon from '~/components/svg/heart-filled-icon'
import HeartIcon from '~/components/svg/heart-icon'

import { api } from '~/trpc/react'
import { useState } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { useHotkeys } from 'react-hotkeys-hook'
import { useRouter } from 'next/navigation'
import { useDebounce } from 'use-debounce'
import { api } from '~/trpc/react'
import SearchIcon from '../_svg/search-icon'
import SpinnerIcon from '../_svg/spinner'
import { useSearchStore } from '~/app/_hooks/use-search-store'
import SearchIcon from '~/components/svg/search-icon'
import SpinnerIcon from '~/components/svg/spinner'
import { useSearchStore } from '~/hooks/use-search-store'

export const SearchDialog = () => {
const { open, toggleOpen } = useSearchStore()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'
import { type getProviders, signIn } from 'next-auth/react'
import { Button } from '~/app/_components/button'
import { Button } from '~/components/button'

export const SignInButtons = ({
providers,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 04c1a04

Please sign in to comment.