Skip to content

Commit 562231d

Browse files
luisd101larrylaa
andauthored
feat: individual project pages (#16)
* feat: luis-frontend * feat: routing for project cards * fix: wrong routing * feat: luis-frontend * feat: luis-frontend * feat. changes to individual project page * chore: react tabs * feat: axios for individual projects --------- Co-authored-by: Larry La <[email protected]>
1 parent 0c5b25a commit 562231d

16 files changed

+634
-126
lines changed

.DS_Store

0 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.6 on 2025-03-12 07:07
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('projects', '0001_initial'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='project',
15+
name='images',
16+
field=models.JSONField(default=list),
17+
),
18+
]

backend/bitmatch/projects/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Project(models.Model):
1212
likes = models.IntegerField(default=0)
1313
positions = models.JSONField(default=list)
1414
image_url = models.URLField(blank=True, null=True)
15+
images = models.JSONField(default=list)
1516

1617
def __str__(self):
1718
return self.title

frontend/.DS_Store

0 Bytes
Binary file not shown.

frontend/bitmatch/eslint.config.js

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import react from 'eslint-plugin-react'
4-
import reactHooks from 'eslint-plugin-react-hooks'
5-
import reactRefresh from 'eslint-plugin-react-refresh'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import react from "eslint-plugin-react";
4+
import reactHooks from "eslint-plugin-react-hooks";
5+
import reactRefresh from "eslint-plugin-react-refresh";
66

77
export default [
8-
{ ignores: ['dist'] },
8+
{ ignores: ["dist"] },
99
{
10-
files: ['**/*.{js,jsx}'],
10+
files: ["**/*.{js,jsx}"],
1111
languageOptions: {
1212
ecmaVersion: 2020,
1313
globals: globals.browser,
1414
parserOptions: {
15-
ecmaVersion: 'latest',
15+
ecmaVersion: "latest",
1616
ecmaFeatures: { jsx: true },
17-
sourceType: 'module',
17+
sourceType: "module",
1818
},
1919
},
20-
settings: { react: { version: '18.3' } },
20+
settings: { react: { version: "18.3" } },
2121
plugins: {
2222
react,
23-
'react-hooks': reactHooks,
24-
'react-refresh': reactRefresh,
23+
"react-hooks": reactHooks,
24+
"react-refresh": reactRefresh,
2525
},
2626
rules: {
2727
...js.configs.recommended.rules,
2828
...react.configs.recommended.rules,
29-
...react.configs['jsx-runtime'].rules,
29+
...react.configs["jsx-runtime"].rules,
3030
...reactHooks.configs.recommended.rules,
31-
'react/jsx-no-target-blank': 'off',
32-
'react-refresh/only-export-components': [
33-
'warn',
31+
"react/jsx-no-target-blank": "off",
32+
"no-unused-vars": "warn",
33+
"react-refresh/only-export-components": [
34+
"warn",
3435
{ allowConstantExport: true },
3536
],
3637
},
3738
},
38-
]
39+
];

frontend/bitmatch/package-lock.json

+15-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/bitmatch/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"react": "^19.0.0",
2020
"react-dom": "^19.0.0",
2121
"react-router-dom": "^7.2.0",
22+
"react-tabs": "^6.1.0",
2223
"tailwind-merge": "^3.0.1",
2324
"tailwindcss-animate": "^1.0.7"
2425
},

frontend/bitmatch/src/App.jsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
import { Button } from "./components/ui/button";
99
import HomePage from "./views/HomePage";
1010
import ProjectListPage from "./views/ProjectListPage";
11-
import './styles/global.css';
11+
import ProjectDetailPage from "./views/IndividualProjectPage";
12+
import "./styles/global.css";
1213

1314
export default function App() {
1415
return (
@@ -31,7 +32,9 @@ export default function App() {
3132
<header className="w-full bg-white shadow-md p-4 fixed top-0 left-0 z-50">
3233
<div className="max-w-[1485px] mx-auto flex justify-between items-center">
3334
<a href="/">
34-
<h2 className="font-sans text-xl font-black text-gray-800">BITMATCH</h2>
35+
<h2 className="font-sans text-xl font-black text-gray-800">
36+
BITMATCH
37+
</h2>
3538
</a>
3639
<UserButton />
3740
</div>
@@ -43,6 +46,9 @@ export default function App() {
4346

4447
{/* Project List Page */}
4548
<Route path="/project-list" element={<ProjectListPage />} />
49+
50+
{/* Individual List Page */}
51+
<Route path="/projects/:id" element={<ProjectDetailPage />} />
4652
</Routes>
4753
</SignedIn>
4854
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import PropTypes from "prop-types";
2+
3+
4+
const Modal = ({ isOpen, onClose, children }) => {
5+
if (!isOpen) return null;
6+
7+
return (
8+
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
9+
<div className="bg-white p-6 rounded-2xl shadow-lg w-96">
10+
<button className="absolute top-2 right-2 text-gray-600" onClick={onClose}>
11+
12+
</button>
13+
<div>{children}</div>
14+
</div>
15+
</div>
16+
);
17+
};
18+
19+
export default Modal;
20+

0 commit comments

Comments
 (0)