-
Notifications
You must be signed in to change notification settings - Fork 2
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
WIP: sublet #274
Draft
jonrxu
wants to merge
40
commits into
master
Choose a base branch
from
jonrxu/add-frontend-sublet
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP: sublet #274
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
6ef481a
new commit
jonrxu f6a1a86
Add frontend for sublet portal
jonrxu e45d1fb
Add README
jonrxu b87f292
current templated services
jonrxu bef8fe0
changed favicon location
jonrxu 49dbe50
added first api call and refactored frontend
jonrxu 14d68fd
fixed service formatting and added new font
jonrxu 4855ed7
edited propertyf listing and changed global colors
jonrxu 1cd8c87
update from origin
jonrxu 4a488fd
added new carousel
jonrxu 09c0c56
finished property listing in dashboard for now, added lucide
jonrxu 57f4f77
rename sublet
jonrxu cb009c3
added form stuff
jonrxu a556c8a
delete files
jonrxu a503a7c
now working images loading into property list
jonrxu 9891a5b
property form edits
jonrxu 0a04f73
update
jonrxu fdf0ed9
property form update
jonrxu 5820e2d
finished form without image, now adding backend route
jonrxu 63eadcd
working changes
jonrxu 9e5e517
image stuff
jonrxu 6e51a63
update components 3/24
jonrxu 8bdf3a1
delete placeholder
jonrxu 4464ddc
fixed image resizing for dashboard
jonrxu b49a819
minor fixes
jonrxu 0f0c156
form image fix
jonrxu 144089b
changed property layout
jonrxu fc1a22e
fix ping
jonrxu ebb9d45
minor formatting changes
jonrxu 860329a
stuff
jonrxu 2525863
added create property image
jonrxu f7afd50
csrftoken method
jonrxu c990e3a
create property image
jonrxu bf51547
property form add image
jonrxu cf7f3dc
add generic api request function
jonrxu 47eeed4
refactored fetch requests into separate method
jonrxu ce9e9ab
added all api requests
jonrxu 699700f
modified next config
jonrxu a8161b4
sync
jonrxu 6532ed0
temp commit
jonrxu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Penn Mobile Subletting Feature | ||
|
||
Welcome to the Penn Mobile Subletting Feature! This innovative marketplace is designed to enhance the subletting experience for the University of Pennsylvania community, offering a user-friendly platform to browse, create, and manage sublet listings with ease. | ||
|
||
## Features | ||
|
||
- **Marketplace Dashboard:** Browse through a wide range of sublet listings in a user-friendly dashboard. Find the perfect match for your subletting needs with detailed information and intuitive navigation. | ||
|
||
- **Personal Listings Management:** Have complete control over your listings through your personal dashboard. Create new listings, edit existing ones, and manage all your subletting activities in one place. | ||
|
||
- **Direct Communication:** Reach out directly to the owners of the listings you are interested in. Our platform facilitates seamless communication between parties to ensure smooth transactions. | ||
|
||
- **User-Friendly Interface:** Built with the Next.js framework and styled using Tailwind CSS along with ShadCN for a modern, responsive design that enhances user experience across devices. | ||
|
||
## Getting Started | ||
|
||
To run the Penn Mobile Subletting Feature locally, just do: | ||
|
||
`npm run dev` | ||
|
||
|
||
## Attributions | ||
|
||
Font: [Satoshi](https://www.fontshare.com/fonts/satoshi) by Indian Type Foundry (ITF) - [ITF Free Font License (FFL)](https://www.fontshare.com/licenses/itf-free-font-license) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
const CreateListing = () => { | ||
return ( | ||
<div>CreateListing</div> | ||
) | ||
} | ||
|
||
export default CreateListing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
"use client"; | ||
|
||
import { useState, useEffect } from "react"; | ||
|
||
import { fetchProperties } from "../../services/propertyService"; | ||
import { PropertyInterface } from "@/interfaces/Property"; | ||
|
||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
|
||
import { PlusIcon } from "lucide-react"; | ||
|
||
import PropertyList from "@/components/custom/PropertyList"; | ||
|
||
import PropertyForm from "@/components/custom/PropertyForm"; | ||
import { AspectRatio } from "@/components/ui/aspect-ratio"; | ||
import Image from "next/image"; | ||
|
||
const Dashboard = () => { | ||
const [properties, setProperties] = useState<PropertyInterface[]>([]); | ||
|
||
useEffect(() => { | ||
fetchProperties() | ||
.then((data) => { | ||
setProperties(data); | ||
}) | ||
.catch((error) => { | ||
console.error("Error fetching properties:", error); | ||
}); | ||
}, []); | ||
|
||
return ( | ||
<div className=""> | ||
|
||
<Tabs defaultValue="posted" className=""> | ||
|
||
<div className="w-screen flex justify-end p-6 gap-4"> | ||
<TabsList> | ||
<TabsTrigger value="posted">Posted</TabsTrigger> | ||
<TabsTrigger value="drafts">Drafts</TabsTrigger> | ||
</TabsList> | ||
<PropertyForm onNewProperty={setProperties}> | ||
<Button className="p-2 rounded-full"> | ||
<PlusIcon className="w-5" /> | ||
</Button> | ||
</PropertyForm> | ||
</div> | ||
|
||
|
||
<TabsContent value="posted" className="p-5"> | ||
<div className="px-10 max-md:px-0"> | ||
<div className="space-y-12"> | ||
<h1 className="text-4xl tracking-tight font-bold"> | ||
My Listings | ||
</h1> | ||
<PropertyList properties={properties} /> | ||
</div> | ||
</div> | ||
</TabsContent> | ||
|
||
|
||
<TabsContent value="drafts" className="p-5"> | ||
<div className="items-center flex flex-col justify-center px-10 max-md:px-0"> | ||
<div className="space-y-12"> | ||
<h1 className="text-4xl tracking-tight font-bold"> | ||
My Drafts | ||
</h1> | ||
<PropertyList properties={properties} /> | ||
</div> | ||
</div> | ||
</TabsContent> | ||
</Tabs> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
:root { | ||
--background: 0 0% 100%; | ||
--foreground: 240 4% 16%; | ||
|
||
--card: 0 0% 100%; | ||
--card-foreground: 240 10% 3.9%; | ||
|
||
--popover: 0 0% 100%; | ||
--popover-foreground: 240 10% 3.9%; | ||
|
||
--primary: 219 100% 69%; | ||
--primary-foreground: 0 0% 98%; | ||
|
||
--secondary: 240 4.8% 95.9%; | ||
--secondary-foreground: 240 5.9% 10%; | ||
|
||
--muted: 240 4.8% 95.9%; | ||
--muted-foreground: 240 3.8% 46.1%; | ||
|
||
--accent: 240 4.8% 95.9%; | ||
--accent-foreground: 240 5.9% 10%; | ||
|
||
--destructive: 0 84.2% 60.2%; | ||
--destructive-foreground: 0 0% 98%; | ||
|
||
--border: 240 5.9% 90%; | ||
--input: 240 5.9% 90%; | ||
--ring: 219 92% 58%; | ||
|
||
--radius: 0.5rem; | ||
} | ||
|
||
.dark { | ||
--background: 240 10% 3.9%; | ||
--foreground: 0 0% 98%; | ||
|
||
--card: 240 10% 3.9%; | ||
--card-foreground: 0 0% 98%; | ||
|
||
--popover: 240 10% 3.9%; | ||
--popover-foreground: 0 0% 98%; | ||
|
||
--primary: 0 0% 98%; | ||
--primary-foreground: 240 5.9% 10%; | ||
|
||
--secondary: 240 3.7% 15.9%; | ||
--secondary-foreground: 0 0% 98%; | ||
|
||
--muted: 240 3.7% 15.9%; | ||
--muted-foreground: 240 5% 64.9%; | ||
|
||
--accent: 240 3.7% 15.9%; | ||
--accent-foreground: 0 0% 98%; | ||
|
||
--destructive: 0 62.8% 30.6%; | ||
--destructive-foreground: 0 0% 98%; | ||
|
||
--border: 240 3.7% 15.9%; | ||
--input: 240 3.7% 15.9%; | ||
--ring: 240 4.9% 83.9%; | ||
} | ||
} | ||
|
||
@layer base { | ||
* { | ||
@apply border-border; | ||
} | ||
|
||
body { | ||
@apply bg-background text-foreground; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { Metadata } from "next"; | ||
|
||
import localFont from "next/font/local"; | ||
//import { Inter } from "next/font/google"; | ||
import "./globals.css"; | ||
|
||
//const inter = Inter({ subsets: ["latin"] }); | ||
|
||
import { Toaster } from "@/components/ui/toaster" | ||
|
||
const satoshi = localFont({ | ||
src: '../fonts/satoshi/Satoshi-Variable.woff2', | ||
display: 'swap', | ||
}) | ||
|
||
export const metadata: Metadata = { | ||
title: "Sublet@Portal", | ||
description: "Welcome to Sublet@Portal. The best place to sublet your room to other students!", | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<html lang="en"> | ||
<body className={satoshi.className}> | ||
<div className=""> | ||
{children} | ||
</div> | ||
<Toaster /> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Image from "next/image"; | ||
|
||
export default function Home() { | ||
return ( | ||
<main className="space-y-10"> | ||
<h1 className="mt-40 text-5xl font-bold text-center tracking-tight text-white"> | ||
<span className="bg-gradient-to-r from-purple-500 to-pink-500 bg-clip-text text-transparent"> | ||
Welcome to Sublet@Portal | ||
</span> | ||
</h1> | ||
<div className="space-y-5"> | ||
<div className="flex justify-center"> | ||
<Image src="/penn-mobile.svg" alt="Sublet@Portal Logo" width={200} height={200} /> | ||
</div> | ||
<p className="text-center">The best place to sublet your room to other students!</p> | ||
</div> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "new-york", | ||
"rsc": true, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.ts", | ||
"css": "app/globals.css", | ||
"baseColor": "zinc", | ||
"cssVariables": true, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
:fetchProperties().then(setProperties);
should also work