Skip to content

Commit

Permalink
Merge pull request #20 from sryung1225/dev
Browse files Browse the repository at this point in the history
전체 경로 절대 경로로 변경
  • Loading branch information
sryung1225 authored Dec 26, 2023
2 parents 70ffc3f + 46e324b commit 7107550
Show file tree
Hide file tree
Showing 39 changed files with 253 additions and 133 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ module.exports = {
],
'no-console': 'off',
},
settings: {
'import/resolver': {
typescript: {},
},
},
};
76 changes: 73 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"devDependencies": {
"@svgr/rollup": "^8.1.0",
"@types/node": "^20.10.5",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/styled-components": "^5.1.32",
Expand All @@ -32,6 +33,7 @@
"eslint": "^8.53.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
Expand Down
18 changes: 9 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { useEffect, useState, lazy, Suspense } from 'react';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import { auth } from './firebase.ts';
import LoadingSpinner from './components/loading-spinner.tsx';
import * as S from './styles/global.ts';
import { auth } from '@/firebase.ts';
import LoadingSpinner from '@compo/loading-spinner.tsx';
import * as S from '@style/global.ts';

const ProtectedRoute = lazy(() => import('./components/protected-route.tsx'));
const Home = lazy(() => import('./routes/home.tsx'));
const Profile = lazy(() => import('./routes/profile.tsx'));
const SearchResult = lazy(() => import('./routes/search-result.tsx'));
const Auth = lazy(() => import('./routes/auth.tsx'));
const Layout = lazy(() => import('./components/layout.tsx'));
const ProtectedRoute = lazy(() => import('@compo/protected-route.tsx'));
const Home = lazy(() => import('@page/home.tsx'));
const Profile = lazy(() => import('@page/profile.tsx'));
const SearchResult = lazy(() => import('@page/search-result.tsx'));
const Auth = lazy(() => import('@page/auth.tsx'));
const Layout = lazy(() => import('@compo/layout.tsx'));

const router = createBrowserRouter([
{
Expand Down
7 changes: 5 additions & 2 deletions src/atoms.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { atom } from 'recoil';

export const signInUserAtom = atom({
key: 'signInUser',
default: null,
});

export const searchKeywordAtom = atom({
key: 'searchKeyword',
default: '',
});

export const tmp = '';
12 changes: 6 additions & 6 deletions src/components/sign-in.tsx → src/components/auth/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { FirebaseError } from 'firebase/app';
import { signInWithEmailAndPassword } from 'firebase/auth';
import { auth } from '../firebase.ts';
import useEscClose from '../utils/use-esc-close.tsx';
import * as S from '../styles/auth.ts';
import * as P from '../styles/popup.ts';
import ImageComputer from '../assets/images/logo-small.png';
import { ReactComponent as LoadingSpinner } from '../assets/images/loading-spinner-mini.svg';
import ImageComputer from '@img/logo-small.png';
import { ReactComponent as LoadingSpinner } from '@img/loading-spinner-mini.svg';
import { auth } from '@/firebase.ts';
import useEscClose from '@util/use-esc-close.tsx';
import * as S from '@style/auth.ts';
import * as P from '@style/popup.ts';

interface ISignInProps {
onClose: () => void;
Expand Down
12 changes: 6 additions & 6 deletions src/components/sign-up.tsx → src/components/auth/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { useNavigate } from 'react-router-dom';
import { FirebaseError } from 'firebase/app';
import { createUserWithEmailAndPassword, updateProfile } from 'firebase/auth';
import { doc, setDoc } from 'firebase/firestore';
import { auth, db } from '../firebase.ts';
import useEscClose from '../utils/use-esc-close.tsx';
import * as S from '../styles/auth.ts';
import * as P from '../styles/popup.ts';
import ImageComputer from '../assets/images/logo-small.png';
import { ReactComponent as LoadingSpinner } from '../assets/images/loading-spinner-mini.svg';
import { auth, db } from '@/firebase.ts';
import useEscClose from '@util/use-esc-close.tsx';
import * as S from '@style/auth.ts';
import * as P from '@style/popup.ts';
import ImageComputer from '@img/logo-small.png';
import { ReactComponent as LoadingSpinner } from '@img/loading-spinner-mini.svg';

interface ISignUpProps {
onClose: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useNavigate } from 'react-router-dom';
import { FirebaseError } from 'firebase/app';
import { AuthProvider, signInWithPopup } from 'firebase/auth';
import { doc, setDoc } from 'firebase/firestore';
import { auth, db } from '../firebase.ts';
import * as S from '../styles/auth.ts';
import { auth, db } from '@/firebase.ts';
import * as S from '@style/auth.ts';

interface ISocialButton {
provider: AuthProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
ref,
uploadBytes,
} from 'firebase/storage';
import { auth, db, storage } from '../firebase.ts';
import ITweet from '../interfaces/ITweet.ts';
import CompressImage from '../utils/compress-image.tsx';
import useEscClose from '../utils/use-esc-close.tsx';
import * as S from '../styles/tweet-form.ts';
import { ReactComponent as IconPhoto } from '../assets/images/i-photo.svg';
import { ReactComponent as LoadingSpinner } from '../assets/images/loading-spinner-mini.svg';
import { auth, db, storage } from '@/firebase.ts';
import ITweet from '@type/ITweet.ts';
import CompressImage from '@util/compress-image.tsx';
import useEscClose from '@util/use-esc-close.tsx';
import * as S from '@style/tweet-form.ts';
import { ReactComponent as IconPhoto } from '@img/i-photo.svg';
import { ReactComponent as LoadingSpinner } from '@img/loading-spinner-mini.svg';

interface IEditTweetForm extends Pick<ITweet, 'id' | 'tweet' | 'photo'> {
onClose: () => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState } from 'react';
import { addDoc, collection, updateDoc } from 'firebase/firestore';
import { getDownloadURL, ref, uploadBytes } from 'firebase/storage';
import { auth, db, storage } from '../firebase.ts';
import CompressImage from '../utils/compress-image.tsx';
import * as S from '../styles/tweet-form.ts';
import { ReactComponent as IconPhoto } from '../assets/images/i-photo.svg';
import { ReactComponent as LoadingSpinner } from '../assets/images/loading-spinner-mini.svg';
import { auth, db, storage } from '@/firebase.ts';
import CompressImage from '@util/compress-image.tsx';
import * as S from '@style/tweet-form.ts';
import { ReactComponent as IconPhoto } from '@img/i-photo.svg';
import { ReactComponent as LoadingSpinner } from '@img/loading-spinner-mini.svg';

export default function PostTweetForm() {
const [isLoading, setLoading] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
orderBy,
query,
} from 'firebase/firestore';
import { db } from '../firebase.ts';
import Tweet from './tweet.tsx';
import * as S from '../styles/timeline.ts';
import ITweet from '../interfaces/ITweet.ts';
import { db } from '@/firebase.ts';
import Tweet from '@compo/home/tweet.tsx';
import * as S from '@style/timeline.ts';
import ITweet from '@type/ITweet.ts';

export default function Timeline() {
const [tweets, setTweets] = useState<ITweet[]>([]);
Expand Down
16 changes: 8 additions & 8 deletions src/components/tweet.tsx → src/components/home/tweet.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useEffect, useState } from 'react';
import { deleteDoc, doc, getDoc } from 'firebase/firestore';
import { deleteObject, ref } from 'firebase/storage';
import { auth, db, storage } from '../firebase.ts';
import ITweet from '../interfaces/ITweet.ts';
import FormatDate from '../utils/format-date.tsx';
import EditTweetForm from './edit-tweet-form.tsx';
import * as S from '../styles/tweet.ts';
import * as P from '../styles/popup.ts';
import { ReactComponent as IconUser } from '../assets/images/i-user.svg';
import { ReactComponent as IconEdit } from '../assets/images/i-edit.svg';
import { auth, db, storage } from '@/firebase.ts';
import ITweet from '@type/ITweet.ts';
import FormatDate from '@util/format-date.tsx';
import EditTweetForm from '@compo/home/edit-tweet-form.tsx';
import * as S from '@style/tweet.ts';
import * as P from '@style/popup.ts';
import { ReactComponent as IconUser } from '@img/i-user.svg';
import { ReactComponent as IconEdit } from '@img/i-edit.svg';

export default function Tweet({
id,
Expand Down
6 changes: 3 additions & 3 deletions src/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Outlet } from 'react-router-dom';
import Wrapper from '../styles/layout.ts';
import Menu from './menu.tsx';
import Search from './search.tsx';
import Wrapper from '@style/layout.ts';
import Menu from '@compo/menu.tsx';
import Search from '@compo/search.tsx';

export default function Layout() {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/loading-spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Wrapper from '../styles/loading-spinner.ts';
import { ReactComponent as Spinner } from '../assets/images/loading-spinner.svg';
import Wrapper from '@style/loading-spinner.ts';
import { ReactComponent as Spinner } from '@img/loading-spinner.svg';

export default function LoadingSpinner() {
return (
Expand Down
18 changes: 9 additions & 9 deletions src/components/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Link, useNavigate } from 'react-router-dom';
import { useEffect, useState } from 'react';
import { auth } from '../firebase.ts';
import WindowTop from './window-top.tsx';
import * as W from '../styles/window.ts';
import * as S from '../styles/menu.ts';
import * as P from '../styles/popup.ts';
import ImageComputer from '../assets/images/logo-small.png';
import { ReactComponent as IconUser } from '../assets/images/i-user.svg';
import { ReactComponent as IconHome } from '../assets/images/i-home.svg';
import { ReactComponent as IconLogout } from '../assets/images/i-arrowleft.svg';
import { auth } from '@/firebase.ts';
import WindowTop from '@compo/window-top.tsx';
import * as W from '@style/window.ts';
import * as S from '@style/menu.ts';
import * as P from '@style/popup.ts';
import ImageComputer from '@img/logo-small.png';
import { ReactComponent as IconUser } from '@img/i-user.svg';
import { ReactComponent as IconHome } from '@img/i-home.svg';
import { ReactComponent as IconLogout } from '@img/i-arrowleft.svg';

export default function Menu() {
const navigate = useNavigate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import {
ref,
uploadBytes,
} from 'firebase/storage';
import { auth, db, storage } from '../firebase.ts';
import IUser from '../interfaces/IUser.ts';
import CompressImage from '../utils/compress-image.tsx';
import useEscClose from '../utils/use-esc-close.tsx';
import * as S from '../styles/profile-form.ts';
import { ReactComponent as IconUser } from '../assets/images/i-user.svg';
import { ReactComponent as LoadingSpinner } from '../assets/images/loading-spinner-mini.svg';
import { auth, db, storage } from '@/firebase.ts';
import IUser from '@type/IUser.ts';
import CompressImage from '@util/compress-image.tsx';
import useEscClose from '@util/use-esc-close.tsx';
import * as S from '@style/profile-form.ts';
import { ReactComponent as IconUser } from '@img/i-user.svg';
import { ReactComponent as LoadingSpinner } from '@img/loading-spinner-mini.svg';

interface IEditProfileForm extends Pick<IUser, 'userAvatar' | 'userName'> {
onClose: () => void;
Expand Down
Loading

0 comments on commit 7107550

Please sign in to comment.