mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +00:00
streamlined folder structure and updated imports
This commit is contained in:
parent
095cbafb64
commit
0a3a406180
23 changed files with 54 additions and 156 deletions
|
@ -1,14 +1,11 @@
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
import LoginAndSignUpPage from "./pages/LoginAndSignUpPage";
|
import "./styles/globalStyles.css";
|
||||||
import PostCreation from "./pages/PostCreation";
|
import LoginAndSignUpPage from "./pages/loginAndSignUpPage/LoginAndSignUpPage";
|
||||||
import "./App.css";
|
import PostCreation from "./pages/postCreation/PostCreation";
|
||||||
import "./styles/colors.css";
|
|
||||||
import "./styles/fonts.css";
|
|
||||||
import "./styles/sizes.css";
|
|
||||||
import Footer from "./components/footer/Footer";
|
import Footer from "./components/footer/Footer";
|
||||||
import Feed, { UserFeedRoute } from "./pages/feed/Feed";
|
import Feed, { UserFeedRoute } from "./pages/feed/Feed";
|
||||||
import Header from "./components/header/Header";
|
import Header from "./components/header/Header";
|
||||||
import Profile from "./pages/Profile";
|
import Profile from "./pages/profile/Profile";
|
||||||
import {
|
import {
|
||||||
BrowserRouter as Router,
|
BrowserRouter as Router,
|
||||||
Routes,
|
Routes,
|
||||||
|
@ -16,7 +13,7 @@ import {
|
||||||
Navigate,
|
Navigate,
|
||||||
} from "react-router-dom";
|
} from "react-router-dom";
|
||||||
import { Auth } from "./api/Auth";
|
import { Auth } from "./api/Auth";
|
||||||
import About from "./pages/About";
|
import About from "./pages/about/About";
|
||||||
import { NotFound } from "./pages/404Page/NotFoundPage";
|
import { NotFound } from "./pages/404Page/NotFoundPage";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
import { Avatar, Box, Typography } from "@mui/material";
|
import { Avatar, Box, Typography } from "@mui/material";
|
||||||
import api from "../api/axios";
|
import api from "../api/axios";
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
|
|
||||||
interface UserAvatarProps {
|
interface UserAvatarProps {
|
||||||
username: string | null;
|
username: string | null;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
import { useState } from "react";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import StyledEngineProvider from "@mui/styled-engine/StyledEngineProvider";
|
|
||||||
import { useState } from "react";
|
|
||||||
import "./bio.css";
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import StyledEngineProvider from "@mui/styled-engine/StyledEngineProvider";
|
||||||
import EditSquareIcon from "@mui/icons-material/EditSquare";
|
import EditSquareIcon from "@mui/icons-material/EditSquare";
|
||||||
import ButtonPrimary from "../buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
import ButtonPrimary from "../../buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
||||||
import api from "../../api/axios";
|
import api from "../../../api/axios";
|
||||||
|
import "./bio.css";
|
||||||
|
|
||||||
export default function BioTextField({ ownAccount, bioText, setBio } : { ownAccount: boolean, bioText: string | undefined, setBio: (bio: string) => void }) {
|
export default function BioTextField({ ownAccount, bioText, setBio } : { ownAccount: boolean, bioText: string | undefined, setBio: (bio: string) => void }) {
|
||||||
const [oldBio, setOldbio] = useState<string>(bioText || "");
|
const [oldBio, setOldbio] = useState<string>(bioText || "");
|
|
@ -1,4 +1,5 @@
|
||||||
import * as React from "react";
|
import React from "react";
|
||||||
|
import { useState, ChangeEvent } from "react";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
styled,
|
styled,
|
||||||
|
@ -13,13 +14,11 @@ import {
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import CloseIcon from "@mui/icons-material/Close";
|
import CloseIcon from "@mui/icons-material/Close";
|
||||||
import EditSquareIcon from "@mui/icons-material/EditSquare";
|
import EditSquareIcon from "@mui/icons-material/EditSquare";
|
||||||
|
import ButtonRotkehlchen from "../../buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
||||||
|
import Username from "../username/Username";
|
||||||
|
import api from "../../../api/axios";
|
||||||
|
import { UserProfile } from "../../../types/UserProfile";
|
||||||
import "./changeAvatarDialog.css";
|
import "./changeAvatarDialog.css";
|
||||||
import ButtonRotkehlchen from "../buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
|
||||||
import Username from "./Username";
|
|
||||||
import "./username.css";
|
|
||||||
import api from "../../api/axios";
|
|
||||||
import { ChangeEvent, useState } from "react";
|
|
||||||
import { UserProfile } from "../../types/UserProfile";
|
|
||||||
|
|
||||||
const BootstrapDialog = styled(Dialog)(({ theme }) => ({
|
const BootstrapDialog = styled(Dialog)(({ theme }) => ({
|
||||||
"& .MuiDialogContent-root": {
|
"& .MuiDialogContent-root": {
|
|
@ -1,11 +1,10 @@
|
||||||
import ImageListItem from "@mui/material/ImageListItem";
|
|
||||||
import { StyledEngineProvider } from "@mui/material/styles";
|
|
||||||
import "./quiltedImageList.css";
|
|
||||||
import { Box, Grid, Skeleton } from "@mui/material";
|
|
||||||
import api from "../../api/axios";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { UserProfile } from "../../types/UserProfile";
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import { Box, Grid, Skeleton, StyledEngineProvider } from "@mui/material";
|
||||||
|
import ImageListItem from "@mui/material/ImageListItem";
|
||||||
|
import api from "../../../api/axios";
|
||||||
|
import { UserProfile } from "../../../types/UserProfile";
|
||||||
|
import "./quiltedImageList.css";
|
||||||
|
|
||||||
type Post = {
|
type Post = {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -50,7 +49,6 @@ export default function StandardImageList({ user }: { user: UserProfile }) {
|
||||||
id: post.id,
|
id: post.id,
|
||||||
description: post.description || "",
|
description: post.description || "",
|
||||||
createdAt: post.createdAt,
|
createdAt: post.createdAt,
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
|
@ -1,5 +1,5 @@
|
||||||
import { Popover, Typography } from "@mui/material";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import { Popover, Typography } from "@mui/material";
|
||||||
import "./username.css";
|
import "./username.css";
|
||||||
|
|
||||||
export default function Username({ username }: { username: string }) {
|
export default function Username({ username }: { username: string }) {
|
|
@ -1,94 +0,0 @@
|
||||||
/*mobile style first*/
|
|
||||||
.footer {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
background-color: var(--Rotkehlchen-gray);
|
|
||||||
padding: 1rem;
|
|
||||||
gap: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-left {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 2rem;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem; /*Gap between icon and logo */
|
|
||||||
text-decoration: none; /*prevents constant underline*/
|
|
||||||
color: black;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link.feather img {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
transform: scale(1.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link img {
|
|
||||||
height: 1.5rem;
|
|
||||||
object-fit: unset;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link.feather span {
|
|
||||||
color: var(--Rotkehlchen-orange-default);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-right {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 0.4rem; /*gap between the links*/
|
|
||||||
align-items: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-column a {
|
|
||||||
color: black;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link:hover,
|
|
||||||
.footer-link:active {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.footer-link.feather:hover,
|
|
||||||
.footer-link.feather:active {
|
|
||||||
text-decoration-color: var(--Rotkehlchen-orange-default);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@media adjusts styles for desktop */
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.footer {
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2rem 4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-left {
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-right {
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 4rem;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-column {
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
import "./about.css";
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import "./about.css";
|
||||||
|
|
||||||
function About() {
|
function About() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
|
@ -34,7 +34,6 @@
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Desktop view*/
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.feedContainer {
|
.feedContainer {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import "./loginAndSignUpPage.css";
|
import "./loginAndSignUpPage.css";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import api from "../api/axios";
|
import api from "../../api/axios";
|
||||||
import ButtonRotkehlchen from "../components/buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
import ButtonRotkehlchen from "../../components/buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
import { useAuth } from "../api/Auth";
|
import { useAuth } from "../../api/Auth";
|
||||||
import { createTheme, useMediaQuery } from "@mui/material";
|
import { createTheme, useMediaQuery } from "@mui/material";
|
||||||
|
|
||||||
type FormData = {
|
type FormData = {
|
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 5px solid var(--Rotkehlchen-gray);
|
border: 5px solid var(--Rotkehlchen-gray);
|
||||||
background-image: url("../../public/assets/images/IceBirdLogin.jpg");
|
background-image: url("../../../public/assets/images/IceBirdLogin.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: 75%;
|
background-position: 75%;
|
||||||
}
|
}
|
||||||
|
@ -130,9 +130,8 @@
|
||||||
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 5px solid var(--Rotkehlchen-gray);
|
border: 5px solid var(--Rotkehlchen-gray);
|
||||||
background-image: url("../../public/assets/images/SummerOwlSignup.jpg");
|
background-image: url("../../../public/assets/images/SummerOwlSignup.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
/*background-position: 75%;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-part {
|
.login-part {
|
|
@ -1,17 +1,15 @@
|
||||||
import "./postCreation.css";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import "./loginAndSignUpPage.css";
|
|
||||||
import { useState, useEffect, useRef } from 'react';
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import Chip from '@mui/material/Chip';
|
import { Box, Card, CardMedia, CardActionArea, IconButton, Typography } from "@mui/material";
|
||||||
import Autocomplete from '@mui/material/Autocomplete';
|
import Chip from "@mui/material/Chip";
|
||||||
import TextField from '@mui/material/TextField';
|
import Autocomplete from "@mui/material/Autocomplete";
|
||||||
import ButtonPrimary from "../components/buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
import TextField from "@mui/material/TextField";
|
||||||
|
import CloseIcon from "@mui/icons-material/Close";
|
||||||
import api from "../api/axios";
|
import { createTheme, ThemeProvider } from "@mui/material/styles";
|
||||||
import { useAuth } from "../api/Auth";
|
import api from "../../api/axios";
|
||||||
import {Box,Card,CardMedia,CardActionArea,IconButton, Typography} from '@mui/material';
|
import { useAuth } from "../../api/Auth";
|
||||||
import CloseIcon from '@mui/icons-material/Close';
|
import ButtonPrimary from "../../components/buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
||||||
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
import "./postCreation.css";
|
||||||
|
|
||||||
const theme = createTheme({
|
const theme = createTheme({
|
||||||
palette: {
|
palette: {
|
|
@ -77,7 +77,7 @@
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-image: url("../../public/assets/images/BirdLogin.jpg");
|
background-image: url("../../../public/assets/images/BirdLogin.jpg");
|
||||||
filter: grayscale();
|
filter: grayscale();
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
|
@ -1,14 +1,14 @@
|
||||||
import "./profile.css";
|
|
||||||
import QuiltedImageList from "../components/profile/QuiltedImageList";
|
|
||||||
import { StyledEngineProvider, Divider } from "@mui/material";
|
|
||||||
import ChangeAvatarDialog from "../components/profile/ChangeAvatarDialog";
|
|
||||||
import Bio from "../components/profile/Bio";
|
|
||||||
import RotkehlchenButton from "../components/buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
|
||||||
import api, { redirectToLogin } from "../api/axios";
|
|
||||||
import { useAuth } from "../api/Auth";
|
|
||||||
import { useNavigate, useParams } from "react-router-dom";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { UserProfile } from "../types/UserProfile";
|
import { useNavigate, useParams } from "react-router-dom";
|
||||||
|
import { StyledEngineProvider, Divider } from "@mui/material";
|
||||||
|
import QuiltedImageList from "../../components/profile/quiltedImageList/QuiltedImageList";
|
||||||
|
import ChangeAvatarDialog from "../../components/profile/changeAvatarDialog/ChangeAvatarDialog";
|
||||||
|
import Bio from "../../components/profile/bio/Bio";
|
||||||
|
import RotkehlchenButton from "../../components/buttons/buttonRotkehlchen/ButtonRotkehlchen";
|
||||||
|
import api, { redirectToLogin } from "../../api/axios";
|
||||||
|
import { useAuth } from "../../api/Auth";
|
||||||
|
import { UserProfile } from "../../types/UserProfile";
|
||||||
|
import "./profile.css";
|
||||||
|
|
||||||
function Profile() {
|
function Profile() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
|
@ -83,7 +83,6 @@ function Profile() {
|
||||||
setBio={setBio}
|
setBio={setBio}
|
||||||
/>
|
/>
|
||||||
<Divider variant="middle" className="divider" />
|
<Divider variant="middle" className="divider" />
|
||||||
{/* TODO: Change data to data from Database */}
|
|
||||||
<div className="numeral-data body-bold">
|
<div className="numeral-data body-bold">
|
||||||
<div className="data">
|
<div className="data">
|
||||||
<span aria-label="current-post-number">{userData?.posts}</span>
|
<span aria-label="current-post-number">{userData?.posts}</span>
|
3
code/frontend/src/styles/globalStyles.css
Normal file
3
code/frontend/src/styles/globalStyles.css
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
@import "./colors.css";
|
||||||
|
@import "./fonts.css";
|
||||||
|
@import "./sizes.css";
|
Loading…
Add table
Add a link
Reference in a new issue