Skip to content

Commit

Permalink
Merge branch 'BrainPix:develop' into feature/mypage/posts
Browse files Browse the repository at this point in the history
  • Loading branch information
gaaahee authored Jan 21, 2025
2 parents 008a8a3 + d723d28 commit 9880b69
Show file tree
Hide file tree
Showing 44 changed files with 981 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Frontend GitHub Actions
name: Merge To Ready
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
push:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/sync-to-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sync Fork With Upstream
on:
push:
branches:
- main
- develop

jobs:
sync:
if: github.repository == 'BrainPix-front'
runs-on: ubuntu-latest

steps:
- name: Checkout develop
uses: actions/checkout@v3
with:
token: ${{secrets.PAT_TOKEN}}
ref: develop
persition-credentials: false

- name: Set up Git
run: |
git config user.name minejeong9919
git config user.email "[email protected]"
- name: Add remote-url
run: |
git remote add forked-repo https://github.com/minjeong9919/BrainPix-front.git
- name: Push changes to Forked-reop
env:
GITHUB_USERNAME: minjeong9919
GITHUB_TOKEN: ${{secrets.PAT_TOKEN}}
run: |
git push -f http://$GITHUB_USERNAME:$GITHUB_TOKEN@https://github.com/minjeong9919/BrainPix-front.git develop
- name: Clean up
run: |
git remote remove forked-repo
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<link
rel="icon"
type="image/svg+xml"
href="/vite.svg" />
href="/src/assets/images/brainPixIcon.png" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>BrainPIX</title>
</head>
<body>
<div id="root"></div>
Expand Down
19 changes: 18 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"eslint-plugin-jsx-a11y": "^6.10.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.54.2",
"react-router-dom": "^7.1.1"
},
"devDependencies": {
Expand All @@ -41,7 +42,7 @@
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
"typescript-plugin-css-modules": "^5.1.0",
"vite": "^6.0.5",
"vite": "^6.0.7",
"vite-plugin-svgr": "^4.3.0"
}
}
11 changes: 8 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import IdeaMarketPayment from './pages/idea-market/IdeaMarketPayment/IdeaMarketP
import { RequestAssign } from './pages/request-assign/RequestAssign';
import { Collaboration } from './pages/collaboration/Collaboration';
import { Signup } from './pages/sign-up/Signup';
import { IndividualMember } from './pages/sign-up/IndividualMember';
import { CorporateMember } from './pages/sign-up/CorporateMember';
import { CompleteSignup } from './pages/sign-up/CompleteSignup';
import { IndividualMember } from './pages/sign-up/individual/IndividualMember';
import { CorporateMember } from './pages/sign-up/corporate/CorporateMember';
import { CompleteSignup } from './components/sign-up/CompleteSignup';
import { Login } from './pages/login/Login';

function App() {
return (
Expand Down Expand Up @@ -57,6 +58,10 @@ function App() {
path='/sign-up/complete'
element={<CompleteSignup />}
/>
<Route
path='/login'
element={<Login />}
/>
</Routes>
</BrowserRouter>
);
Expand Down
4 changes: 4 additions & 0 deletions src/assets/icons/bookmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/eyeNonVisible.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/eyeVisible.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/brainPixIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import classNames from 'classnames';
import { ChangeEvent, useRef, useState, KeyboardEvent } from 'react';

import { useOutsideClick } from '../../hooks/useOutsideClick';
import Search from '../../assets/icons/search.svg?react';
import Delete from '../../assets/icons/delete.svg?react';
import Clock from '../../assets/icons/clock.svg?react';
import { debounce } from '../../utils/debounce';
import Search from '../../../assets/icons/search.svg?react';
import Delete from '../../../assets/icons/delete.svg?react';
import Clock from '../../../assets/icons/clock.svg?react';
import { debounce } from '../../../utils/debounce';
import { useOutsideClick } from '../../../hooks/useOutsideClick';

import styles from './searchInput.module.scss';

Expand Down
File renamed without changes.
68 changes: 68 additions & 0 deletions src/components/preview/PreviewThumbnail.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import React from 'react';
import styles from './previewThumbnail.module.scss';
import Bookmark from '../../assets/icons/bookmark.svg?react';

interface PreviewThumbnailProps {
imageUrl?: string;
profileImage?: string;
username?: string;
description?: string;
price?: number;
isBookmarked?: boolean;
onBookmarkClick?: () => void;
verified?: boolean;
}

const PreviewThumbnail: React.FC<PreviewThumbnailProps> = ({
imageUrl = '',
profileImage = '',
username = '',
description = '',
price = 0,
isBookmarked = false,
onBookmarkClick = () => {},
verified = false,
}) => {
return (
<div className={styles.container}>
<div className={styles.profileSection}>
<div className={styles.profileImage}>
<img
src={profileImage || '/api/placeholder/24/24'}
alt={username}
/>
</div>
<span>{username}</span>
{verified && <span className={styles.verifiedBadge}>인증됨</span>}
</div>

<div className={styles.thumbnailImage}>
{imageUrl ? (
<img
src={imageUrl}
alt={description}
/>
) : (
<img
src='/api/placeholder/312/372'
alt='placeholder'
/>
)}
</div>

<div className={styles.contentSection}>
<p>{description}</p>
<div className={styles.priceSection}>
<span>{price?.toLocaleString() ?? 0}</span>
<button onClick={onBookmarkClick}>
<Bookmark
className={`${styles.bookmarkIcon} ${isBookmarked ? styles.bookmarked : ''}`}
/>
</button>
</div>
</div>
</div>
);
};

export default PreviewThumbnail;
95 changes: 95 additions & 0 deletions src/components/preview/previewThumbnail.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
.container {
width: 312px;
border: 0.5px solid #DBDBDB;
border-radius: 5px;
}

.profileSection {
display: flex;
align-items: center;
gap: 8px;
padding: 8px;

& > span {
font-size: 14px;
color: #424242;
}
}

.profileImage {
width: 24px;
height: 24px;
border-radius: 50%;
overflow: hidden;

& > img {
width: 100%;
height: 100%;
object-fit: cover;
}
}

.verifiedBadge {
padding: 2px 8px;
background-color: #006AC6;
color: white;
border-radius: 4px;
font-size: 12px;
}

.thumbnailImage {
width: 312px;
height: 372px;
background-color: #DBDBDB;

& > img {
width: 100%;
height: 100%;
object-fit: cover;
}
}

.contentSection {
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;

& > p {
font-size: 14px;
color: #424242;
}
}

.priceSection {
display: flex;
justify-content: space-between;
align-items: center;

& > span {
font-weight: 500;
font-size: 16px;
color: #424242;
}

& > button {
cursor: pointer;
background: none;
border: none;
padding: 0;
}
}

.bookmarkIcon {
width: 20px;
height: 20px;
color: #757575;

&.bookmarked {
fill: #757575;
}

&:hover {
color: #424242;
}
}
File renamed without changes.
Loading

0 comments on commit 9880b69

Please sign in to comment.