no idea what i did
This commit is contained in:
@@ -2,3 +2,5 @@ node_modules
|
||||
start_in_tmux.sh
|
||||
default.json
|
||||
production.json
|
||||
bin
|
||||
obj
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { logOut } from "../../reducers/auth";
|
||||
import { useAppDispatch, useAppSelector } from "../../utils/hooks";
|
||||
@@ -69,7 +68,7 @@ const Navbar = () => {
|
||||
<AppBar position="static">
|
||||
<Container maxWidth="xl">
|
||||
<Toolbar disableGutters>
|
||||
{/*Icon for big dislay*/}
|
||||
{/*Icon for big display*/}
|
||||
<AdbIcon sx={{ display: { xs: "none", md: "flex" }, mr: 1 }} />
|
||||
{/*LOGO link for bi display*/}
|
||||
<Typography
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Button, Container, TextField, Typography } from "@mui/material";
|
||||
{ Box, Button, Container, TextField, Typography } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { createAlert } from "../../actions/alert";
|
||||
import { addPost } from "../../actions/post";
|
||||
|
||||
@@ -55,7 +55,7 @@ const ProfileForm = () => {
|
||||
// then build our profileData
|
||||
if (!loading && profile) {
|
||||
const profileData: any = { ...initialState };
|
||||
// cant figure out how to type key to be keyof profile so they are any now
|
||||
// can't figure out how to type key to be keyof profile so they are any now
|
||||
for (const key in profile) {
|
||||
if (key in profileData) profileData[key] = profile[key];
|
||||
}
|
||||
@@ -215,7 +215,7 @@ const ProfileForm = () => {
|
||||
</Grid>
|
||||
<Grid size={{ xs: 6 }}>
|
||||
<Typography>
|
||||
Please use comma separeted values (eg. HTML, CSS, JavaScript, PHP)
|
||||
Please use comma separated values (eg. HTML, CSS, JavaScript, PHP)
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 6 }}>
|
||||
@@ -240,7 +240,7 @@ const ProfileForm = () => {
|
||||
labelId="status"
|
||||
name="status"
|
||||
required
|
||||
placeholder="Select Profesional status"
|
||||
placeholder="Select Professional status"
|
||||
defaultValue={""}
|
||||
>
|
||||
<MenuItem value="">None</MenuItem>
|
||||
@@ -258,7 +258,7 @@ const ProfileForm = () => {
|
||||
</Grid>
|
||||
<Grid size={{ xs: 6 }}>
|
||||
<Typography paddingTop="2.3rem">
|
||||
Select Profesional Status
|
||||
Select Professional Status
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
|
||||
@@ -7,7 +7,7 @@ interface postState {
|
||||
post: Post | null;
|
||||
loading: boolean;
|
||||
error: {};
|
||||
//Todo erros
|
||||
//Todo errors
|
||||
}
|
||||
const initialState: postState = {
|
||||
posts: [],
|
||||
|
||||
@@ -10,6 +10,3 @@ db.createUser({
|
||||
});
|
||||
|
||||
db.createCollection("todos");
|
||||
|
||||
db.todos.insert({ text: "Write code", done: true });
|
||||
db.todos.insert({ text: "Learn about containers", done: false });
|
||||
|
||||
Generated
+21
@@ -26,6 +26,7 @@
|
||||
"devDependencies": {
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/config": "^3.3.0",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/gravatar": "^1.8.3",
|
||||
"@types/jsonwebtoken": "^9.0.2",
|
||||
@@ -116,6 +117,16 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/cors": {
|
||||
"version": "2.8.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
|
||||
"integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/express": {
|
||||
"version": "4.17.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz",
|
||||
@@ -552,6 +563,7 @@
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
||||
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"object-assign": "^4",
|
||||
"vary": "^1"
|
||||
@@ -2209,6 +2221,15 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/cors": {
|
||||
"version": "2.8.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
|
||||
"integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/express": {
|
||||
"version": "4.17.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"devDependencies": {
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/config": "^3.3.0",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/gravatar": "^1.8.3",
|
||||
"@types/jsonwebtoken": "^9.0.2",
|
||||
|
||||
+6
-3
@@ -1,10 +1,13 @@
|
||||
import express from "express";
|
||||
|
||||
import connectDB from "./config/db";
|
||||
|
||||
import path from "path";
|
||||
import cors from "cors";
|
||||
|
||||
const app = express();
|
||||
|
||||
// add cors otherwise fronend cannot access backedn
|
||||
app.use(cors());
|
||||
|
||||
connectDB();
|
||||
|
||||
app.use(express.json());
|
||||
@@ -18,7 +21,7 @@ app.use("/api/posts", require("./routers/api/posts"));
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
console.log("in production");
|
||||
app.use(express.static("client/build"));
|
||||
app.get("*", (req, res) => [
|
||||
app.get("*", (_, res) => [
|
||||
res.sendFile(path.resolve(__dirname, "client", "build", "index.html")),
|
||||
]);
|
||||
}
|
||||
|
||||
+2
-3
@@ -3,11 +3,10 @@
|
||||
# systemctl start mongodb.service
|
||||
|
||||
sn=devCon
|
||||
cd ~/dev-connect/
|
||||
tmux new-session -s "$sn" -n etc -d "nvim .; exec zsh"
|
||||
cd ~/dev-connect/client
|
||||
cd client
|
||||
tmux new-window -t "$sn:2" -n "client" "npm run dev"
|
||||
cd ~/dev-connect/server
|
||||
cd ../server
|
||||
tmux new-window -t "$sn:3" -n "server" "npm run server"
|
||||
|
||||
tmux select-window -t "$sn:1"
|
||||
|
||||
Reference in New Issue
Block a user