Skip to content

Commit

Permalink
feat: new golf table and frontend
Browse files Browse the repository at this point in the history
edotau committed May 8, 2024
1 parent fc3cbaf commit 2c977a2
Showing 9 changed files with 636 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/dist
/node_modules
.DS_Store
.DS_Store
.env
/backend/.env.test
7 changes: 0 additions & 7 deletions backend/.env

This file was deleted.

7 changes: 0 additions & 7 deletions backend/.env.test

This file was deleted.

14 changes: 14 additions & 0 deletions connect.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
POSTGRES="16.2"
# Run docker ps and search for the "postgres:16.2" image, then cut the first column which is the container ID
container_id=$(docker ps | grep "postgres:${POSTGRES}" | awk '{print $1}')

# Check if we found a container ID
if [ -z "$container_id" ]; then
echo "No container found for the image postgres:${POSTGRES}"

else
echo "docker exec -it $(docker ps | grep "postgres:${POSTGRES}" | awk '{print $1}') su postgres
"
docker exec -it $(docker ps | grep "postgres:${POSTGRES}" | awk '{print $1}') su postgres
fi
114 changes: 114 additions & 0 deletions ui/src/pages/AboutMe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import React from "react";

import { ThemeProvider, StyleReset, Div, Text } from "atomize";

const theme = {
colors: {
black900: "#1d1d1e",
},
};

const AboutMe = () => {
return (
<ThemeProvider theme={theme}>
<StyleReset />
<Div
textColor="black900"
h="90%"
align="center"
maxW="800px"
minW="600px"
m={{ x: "auto", y: "2rem" }}
p={{ x: "2rem", y: "2rem" }}
d="flex"
justify="center"
flexDir="column"
>
<Div
p={{ x: "1rem", y: "1rem" }}
d="flex"
flexDir="column"
justify="center"
align="center"
>
<Text
tag="h1"
textSize="display1"
fontFamily="secondary"
textWeight="500"
p={{ x: "1rem", y: "1rem" }}
>
Welcome to my life
</Text>
</Div>
<p>
I am a Software Engineer who studied Computer Science & Mathematics
and knows more genetics than your average biologist. The curiosity I
have for developmental biology and genomics inspired me to pursue a
technical background in computer science and molecular genetics. It is
incredibly motivating looking back on the knowledge I have
accumulated, to realize how my areas of expertise can work together
and answer questions at the intersection of computer science and
biotechnology.
</p>
<p>
When I am not thinking about recombinant DNA and/or deployments of
full stack cloud applications, I enjoy blogging about fashion and
lifesyle on Pinterest. I love playing and competing in sports,
especially badminton, golf, power lifting, and skiing. I cheer for the
Golden State Warriors and the San Francisco 49ers and absolutely love
watching my favorite NBA and NFL teams competing head to head every
week.
</p>
<p>
While the best chapters of my life are being written, I am living my
best life because life is too precious to spend even a single second
unhappy. I hope being who I am will start redefining the boundaries of
happiness, success and hard work.
</p>
<div className="flex align-items-center justify-content-center">
<div className="grid">
<div className="col-fixed">
<a
href="https://www.linkedin.com/in/edotau/"
rel="noreferrer"
style={{ color: "#007bff" }}
>
Linkedin
</a>
</div>
<div className="col-fixed">
<a
href="https://github.com/edotau"
rel="noreferrer"
style={{ color: "#007bff" }}
>
Github
</a>
</div>
<div className="col-fixed">
<a
href="https://www.pinterest.com/edotau/redefined/"
rel="noreferrer"
style={{ color: "#007bff" }}
>
Pinterest
</a>
</div>
<div className="col-fixed">
<a
href="https://www.instagram.com/_edotau/"
rel="noreferrer"
style={{ color: "#007bff" }}
>
Instagram
</a>
</div>
</div>
</div>
</Div>
</ThemeProvider>
);
};

export default AboutMe;
10 changes: 10 additions & 0 deletions ui/src/pages/Experience.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";

const Experience = () => {
return (
<div>
<embed src="/files/aueric_resume.pdf" width="800px" height="1050px" />
</div>
);
};
export default Experience;
3 changes: 3 additions & 0 deletions ui/src/pages/GolfTable.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.golf-table {
font-size: 12px;
}
78 changes: 78 additions & 0 deletions ui/src/pages/GolfTable.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React, { useState } from 'react';
// import React, { useEffect, useState } from 'react';
import { DataTable } from 'primereact/datatable';
import { Column } from 'primereact/column';

import 'primereact/resources/themes/saga-blue/theme.css'; // Or another theme
import 'primereact/resources/primereact.min.css'; // Core styles

// import { Endpoints } from '../api'
import './GolfTable.css'

// Function to fetch the golf clubs data from the backend
// const fetchGolfClubs = async () => {
// try {
// const response = await fetch(Endpoints.datatable);
// if (!response.ok) {
// throw new Error('Error fetching data');
// }
// const data = await response.json();
// setGolfClubs(data);
// } catch (err) {
// setError(err.message);
// } finally {
// setLoading(false);
// }

const GolfTable = () => {
// Manually enter the golf club data as an array of objects
const golfClubs = [
{ id: 1, club: 'Driver', model: 'Callaway Paradym', loft: '10.5°', shaft: 'Fujikura Ventus TR Red Velocore 5R', length: '44.5"', weight: '59.5g', torque: '3.5', tip: '0.335', flex: 'R/5.5' },
{ id: 2, club: '3 Wood', model: 'Ping G430 SFT', loft: '16°', shaft: 'Fujikura Ventus Red Velocore 6R', length: '42.25"', weight: '64.5g', torque: '3.4', tip: '0.335', flex: 'R/5.5' },
{ id: 3, club: '5 Wood', model: 'Ping G430 SFT', loft: '18°', shaft: 'Fujikura Ventus Red Velocore 6R', length: '42"', weight: '64.5g', torque: '3.4', tip: '0.335', flex: 'R/5.5' },
{ id: 4, club: '4 Hybrid', model: 'Callaway Super Paradym', loft: '21°', shaft: 'Ust Mamiya Recoil Dart HYB', length: '39.25"', weight: '65g', torque: '2.8', tip: '0.37', flex: 'R/5.5' },
{ id: 5, club: '5 Iron', model: 'Mizuno JPX 921 Hot Metal', loft: '22°', shaft: 'True Temper Elevate 95 VSS', length: '38"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 6, club: '6 Iron', model: 'Mizuno JPX 921 Hot Metal', loft: '25°', shaft: 'True Temper Elevate 95 VSS', length: '37.5"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 7, club: '7 Iron', model: 'Mizuno JPX 921 Hot Metal', loft: '29°', shaft: 'True Temper Elevate 95 VSS', length: '37"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 8, club: '8 Iron', model: 'Mizuno JPX 921 Hot Metal', loft: '34°', shaft: 'True Temper Elevate 95 VSS', length: '36.5"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 9, club: '9 Iron', model: 'Mizuno JPX 921 Hot Metal', loft: '39°', shaft: 'True Temper Elevate 95 VSS', length: '36"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 10, club: 'Pitching Wedge', model: 'Mizuno JPX 921 Hot Metal', loft: '44°', shaft: 'True Temper Elevate 95 VSS', length: '35.5"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 11, club: 'Gap Wedge', model: 'Mizuno JPX 921 Hot Metal', loft: '49°', shaft: 'True Temper Elevate 95 VSS', length: '35.25"', weight: '98g', torque: '2.2', tip: '0.355', flex: 'S/6.0' },
{ id: 12, club: 'Sand Wedge', model: 'Titleist Vokey SM9 Jet Black', loft: '56°', shaft: 'KBS Tour Lite 95', length: '35.25"', weight: '128g', torque: '1.8°', tip: '0.355', flex: 'R/5.5' },
{ id: 13, club: 'Lob Wedge', model: 'Titleist Vokey SM9 Jet Black', loft: '60°', shaft: 'KBS Tour Lite 95', length: '35"', weight: '128g', torque: '1.8°', tip: '0.355', flex: 'R/5.5' },
{ id: 14, club: 'Putter', model: 'Odyssey Tri-Hot 5k DBL Wide CH', loft: '3°', shaft: 'Stroke Lab 3GEN Red 70', length: '34"', weight: '70g', torque: '-', tip: '-', flex: '-' }
];

// State to handle selected row
const [selectedClub, setSelectedClub] = useState(null);

// Render the golf clubs using PrimeReact's DataTable component
return (
<div className="card">
<div className="golf-table">
<DataTable
value={golfClubs}
selectionMode="single"
selection={selectedClub}
onSelectionChange={(e) => setSelectedClub(e.value)}
dataKey="id"
tableStyle={{ minWidth: '50rem' }}
scrollable
scrollHeight="400px"
>
<Column field="club" header="Club" style={{ minWidth: '150px' }} />
<Column field="model" header="Model" style={{ minWidth: '250px' }} />
<Column field="shaft" header="Shaft" style={{ minWidth: '300px' }} />
<Column field="loft" header="Loft" style={{ minWidth: '50px' }} />
<Column field="length" header="Length" style={{ minWidth: '100px' }} />
<Column field="weight" header="Weight" style={{ minWidth: '100px' }} />
<Column field="torque" header="Torque" style={{ minWidth: '100px' }} />
<Column field="tip" header="Tip" style={{ minWidth: '100px' }} />
<Column field="flex" header="Flex" style={{ minWidth: '100px' }} />
</DataTable>
</div>
</div>
);
};

export default GolfTable;
414 changes: 414 additions & 0 deletions ui/src/pages/Projects.js

Large diffs are not rendered by default.

0 comments on commit 2c977a2

Please sign in to comment.