Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added client/dist/assets/developers/AlanZhong.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 client/dist/assets/developers/ChristinaXu.jpeg
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 client/dist/assets/developers/DohunKim.jpeg
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 client/dist/assets/developers/QuntaoZheng.jpeg
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 client/dist/assets/developers/RyanFernandes.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 client/dist/assets/developers/no-user.png
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 client/dist/assets/icons/github-icon.png
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 client/dist/assets/icons/link-icon.png
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 client/dist/assets/icons/link.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 client/dist/assets/icons/linkedin-icon.png
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 client/dist/assets/icons/new-link.png
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 client/dist/assets/icons/star-empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions client/dist/assets/icons/star-full.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 client/dist/assets/icons/website-icon.png
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 client/dist/assets/icons/ycs-icon.png
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 client/dist/assets/icons/yura-icon.png
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 client/dist/assets/index-CDOBa6eK.css

Large diffs are not rendered by default.

316 changes: 316 additions & 0 deletions client/dist/assets/index-CbSqCWf5.js

Large diffs are not rendered by default.

Binary file added client/dist/assets/logos/RDB.png
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 client/dist/assets/logos/YURA.png
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 client/dist/assets/logos/paperclip.png
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 client/dist/assets/logos/ylabs-blue.png
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 client/dist/assets/logos/ylabs-temp-blue.png
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 client/dist/assets/logos/ylabs-temp.png
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 client/dist/favicon.ico
Binary file not shown.
29 changes: 29 additions & 0 deletions client/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Find research labs at Yale University"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
<title>YaleLabs</title>
<script type="module" crossorigin src="/assets/index-CbSqCWf5.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CDOBa6eK.css">
</head>
<body>
<div id="root"></div>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3SQLGT56ZM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-3SQLGT56ZM');
</script>
</body>
</html>
Expand Down
15 changes: 15 additions & 0 deletions client/dist/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "y/labs",
"name": "y/labs",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions client/dist/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
28 changes: 28 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Find research labs at Yale University"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
<title>YaleLabs</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3SQLGT56ZM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-3SQLGT56ZM');
</script>
</body>
</html>
23 changes: 14 additions & 9 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"@emotion/react": "^11.8.1",
"@emotion/styled": "^11.8.1",
"@mui/material": "^5.4.3",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.1",
"@types/node": "^16.11.26",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"axios": "^0.26.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "19.0.0-rc.0",
"react-dom": "19.0.0-rc.0",
"react-router-dom": "^6.21.2",
"react-scripts": "5.0.0",
"react-spinners": "^0.11.0",
Expand All @@ -24,11 +24,12 @@
"typescript": "^4.5.5",
"web-vitals": "^2.1.4"
},
"type": "module",
"scripts": {
"start": "set PORT=3000 && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest"
},
"eslintConfig": {
"extends": [
Expand All @@ -50,6 +51,10 @@
},
"devDependencies": {
"@types/styled-components": "^5.1.23",
"tailwindcss": "3"
"@vitejs/plugin-react": "^4.4.1",
"jsdom": "^26.1.0",
"tailwindcss": "3",
"vite": "^6.3.5",
"vitest": "^3.1.3"
}
}
8 changes: 8 additions & 0 deletions client/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const postcssConfig = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

export default postcssConfig;
2 changes: 1 addition & 1 deletion client/src/components/DeveloperCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const DeveloperCard = ({ developer }: DeveloperCardProps) => {
return(
<div>
<img
src={developer.image ? developer.image : "assets/developers/no-user.png"}
src={developer.image ? developer.image : "/assets/developers/no-user.png"}
alt={`${developer.name} Profile Picture`}
className="aspect-square object-cover w-full rounded-lg mb-2"
width={500}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function Search(props: SearchProps) {
setIsLoading(true);
const backendBaseURL = window.location.host.includes("yalelabs.io")
? "https://yalelabs.io"
: process.env.REACT_APP_SERVER;
: import.meta.env.VITE_APP_SERVER;
const url = backendBaseURL + '/listings?dept=' + departments
+ '&keywords=' + keywords + '&lname=' + lastNamePI;
axios.get(url).then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/SignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useState } from "react";
const SignInButton = () => {
const backendBaseURL = window.location.host.includes("yalelabs.io")
? "https://yalelabs.io"
: process.env.REACT_APP_SERVER;
: import.meta.env.VITE_APP_SERVER;

const [redirectUrl, setRedirectUrl] = useState(window.location.origin);

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/home/SearchHub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const SearchHub = ({
const formattedDepartments = selectedDepartments.join(',');
const backendBaseURL = window.location.host.includes('yalelabs.io')
? 'https://yalelabs.io'
: process.env.REACT_APP_SERVER;
: import.meta.env.VITE_APP_SERVER;

if (sortBy === 'default') {
url =
Expand Down
15 changes: 11 additions & 4 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";

import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import UserContextProvider from "./providers/UserContextProvider";

ReactDOM.render(
const container = document.getElementById("root");

if (!container) {
throw new Error("Root container missing in index.html");
}

const root = createRoot(container);

root.render(
<React.StrictMode>
<UserContextProvider>
<App />
</UserContextProvider>
</React.StrictMode>,
document.getElementById("root")
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
Expand Down
11 changes: 11 additions & 0 deletions client/src/types/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,15 @@ export type Developer = {
website?: string;
linkedin?: string;
github?:string;
}

interface ImportMeta {
readonly env: {
readonly VITE_APP_TITLE: string;
readonly MODE: string;
readonly BASE_URL: string;
readonly PROD: boolean;
readonly DEV: boolean;
[key: string]: string | boolean | undefined;
};
}
7 changes: 7 additions & 0 deletions client/src/types/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
interface ImportMetaEnv {
readonly VITE_APP_SERVER: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
2 changes: 1 addition & 1 deletion client/src/utils/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from "axios";

const backendBaseURL = window.location.host.includes("yalelabs.io")
? "https://yalelabs.io"
: process.env.REACT_APP_SERVER;
: import.meta.env.VITE_APP_SERVER;

export default axios.create({
withCredentials: true,
Expand Down
1 change: 1 addition & 0 deletions client/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./index.html",
"./src/**/*.{js,jsx,ts,tsx}"
],
theme: {
Expand Down
8 changes: 5 additions & 3 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
"jsx": "react-jsx",
"types": ["react", "react-dom"]
},
"include": [
"src"
, "postcss.config.mjs" ]
"src",
"postcss.config.mjs"
]
}
12 changes: 12 additions & 0 deletions client/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
plugins: [react()],
css: {
postcss: './postcss.config.js',
},
server: {
port: 3000,
},
});
Loading