Skip to content

Commit

Permalink
Fix GitHub contributions chart.
Browse files Browse the repository at this point in the history
  • Loading branch information
Den4200 committed Jul 25, 2023
1 parent d681eba commit 48f66f5
Show file tree
Hide file tree
Showing 22 changed files with 1,820 additions and 262 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.env
portfolio_frontend/src/styles/index.css
postgres_data/
4 changes: 2 additions & 2 deletions portfolio_backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ fn run_migrations(rocket: Rocket) -> Result<Rocket, Rocket> {
fn create_cors() -> Cors {
let allowed_origins = AllowedOrigins::some_exact(&[
"https://dennispham.me",
"http://localhost:8000",
"http://127.0.0.1:8000",
"http://localhost:3000",
"http://127.0.0.1:3000",
]);

CorsOptions {
Expand Down
14 changes: 11 additions & 3 deletions portfolio_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
"react-scripts": "4.0.3",
"react-scroll": "^1.8.1",
"react-typed": "^1.2.0",
"react-use-event-hook": "^0.9.6",
"typescript": "^4.0.3",
"web-vitals": "^1.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts --openssl-legacy-provider build",
"start": "postcss src/styles/tailwind.css -o src/styles/index.css --watch & react-scripts --openssl-legacy-provider start",
"build": "postcss src/styles/tailwind.css -o src/styles/index.css && react-scripts --openssl-legacy-provider build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand All @@ -57,5 +58,12 @@
"last 1 safari version"
]
},
"proxy": "http://localhost:8000"
"proxy": "http://localhost:8000",
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"postcss": "^8.4.27",
"postcss-cli": "^10.1.0",
"postcss-preset-env": "^9.1.0",
"tailwindcss": "^3.3.3"
}
}
3 changes: 3 additions & 0 deletions portfolio_frontend/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require("tailwindcss"), require("postcss-preset-env")],
};
41 changes: 22 additions & 19 deletions portfolio_frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "bootstrap/dist/css/bootstrap.min.css";
import Loading from "./components/Loading";
import NavBar from "./components/NavBar";
import PrivateSuspenseRoute from "./components/PrivateSuspenseRoute";
import { GraphDataProvider } from "./hooks/contribGraph";

const IndexPage = React.lazy(() => import("./pages/IndexPage"));
const ProjectsPage = React.lazy(() => import("./pages/ProjectsPage"));
Expand All @@ -29,25 +30,27 @@ function App() {
return (
<Router>
<Switch>
{routes.map(({ path, Component }) => (
<Route exact key={path} path={path}>
{path.startsWith("/auth") ? null : <NavBar />}

<Suspense fallback={<Loading />}>
<Component />
</Suspense>
</Route>
))}

{adminRoutes.map(({ path, Component }) => (
<PrivateSuspenseRoute
exact
key={path}
path={path}
component={Component}
fallback={<Loading />}
/>
))}
<GraphDataProvider>
{routes.map(({ path, Component }) => (
<Route exact key={path} path={path}>
{path.startsWith("/auth") ? null : <NavBar />}

<Suspense fallback={<Loading />}>
<Component />
</Suspense>
</Route>
))}

{adminRoutes.map(({ path, Component }) => (
<PrivateSuspenseRoute
exact
key={path}
path={path}
component={Component}
fallback={<Loading />}
/>
))}
</GraphDataProvider>
</Switch>
</Router>
);
Expand Down
127 changes: 0 additions & 127 deletions portfolio_frontend/src/api.ts

This file was deleted.

0 comments on commit 48f66f5

Please sign in to comment.