Skip to content
Open
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
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from "react-router-dom";
import { Home } from "./components/home/home";
import { Signin } from "./components/signin/signin";
import { getToken } from "./common/user";
import GuardedRoute from "./components/guardedRoute";
import { DoPost } from "./components/do-post/do-post";
import { FindNeedy } from "./components/find-needy/find-needy";
Expand Down
12 changes: 1 addition & 11 deletions src/common/api.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import axios from "axios";
import { toast } from "react-toastify";
import { Subject } from "rxjs";
import { getPositionOfLineAndCharacter } from "typescript";
import { getPhoneNumber, getToken, getUserId } from "./user";
import { getToken } from "./user";
const baseURL = axios.create({
baseURL: process.env.REACT_APP_NODEJS_API,
});
Expand Down Expand Up @@ -46,15 +45,6 @@ baseURL.interceptors.response.use(
}
);
export type TLatestOperation = "Completed" | "Started" | "Idle";
interface updateStatus {
postId: string;
latestOperation: TLatestOperation;
}
interface IAuthReqBody {
userId: string;
phoneNumber: string;
token: string;
}

interface userDataResponse {
name: string;
Expand Down
11 changes: 5 additions & 6 deletions src/components/contribution-page/contribution.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { group } from "node:console";
import React from "react";
import { Link,useHistory } from "react-router-dom";
import { useHistory } from "react-router-dom";
import styles from "./contribution.module.css";


Expand Down Expand Up @@ -31,7 +30,7 @@ export function Contribution() {

<div className={` row ${styles.postBox}`}>
<div className="col-3 col-sm-2 col-md-1" >
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png"></img>
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png" alt="profile pick"></img>
</div>
<div className="col-9 col-sm-10 col-md-11 ">
<h3 className={styles.name}>
Expand All @@ -43,7 +42,7 @@ export function Contribution() {
</div>
<div className={`- row ${styles.postBox}`}>
<div className="col-3 col-sm-2 col-md-1" >
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png"></img>
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png" alt="profile pick"></img>
</div>
<div className="col-9 col-sm-10 col-md-11 ">
<h3 className={styles.name}>
Expand All @@ -55,7 +54,7 @@ export function Contribution() {
</div>
<div className={` row ${styles.postBox}`}>
<div className="col-3 col-sm-2 col-md-1" >
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png"></img>
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png" alt="profile pick"></img>
</div>
<div className="col-9 col-sm-10 col-md-11 ">
<h3 className={styles.name}>
Expand All @@ -67,7 +66,7 @@ export function Contribution() {
</div>
<div className={` row ${styles.postBox}`}>
<div className="col-3 col-sm-2 col-md-1" >
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png"></img>
<img className={styles.profile_pic} height="60px" width="60px" src="assets/detailed-post/profile-pic.png" alt="profile pick"></img>
</div>
<div className="col-9 col-sm-10 col-md-11 ">
<h3 className={styles.name}>
Expand Down
18 changes: 2 additions & 16 deletions src/components/detailed-post/detailed-post.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import { Link, RouteProps, useHistory } from "react-router-dom";
import { RouteProps, useHistory } from "react-router-dom";
import styles from "./detailed-post.module.css";
import {
fetchDetailedPost,
Expand All @@ -9,21 +9,6 @@ import {
} from "../../common/api";
import { MapBox } from "../mapbox/mapbox";
import mapboxgl from "mapbox-gl";
// state = {
// Urls:[
// {URL:"assets/detailed-post/poor1.jpg"},
// {URL:"assets/detailed-post/poor2.jpg"},
// {URL:"assets/detailed-post/poor3.jpg"},
// ],
// };
type File = {
URL: string;
};
type Post = {
Name: string;
Images: string[];
Description: string;
};

export function DetailedPost(props: RouteProps) {
const [name, setName] = useState<string>("");
Expand Down Expand Up @@ -80,6 +65,7 @@ export function DetailedPost(props: RouteProps) {
<img
className={styles.profile_pic}
src="assets/detailed-post/profile-pic.png"
alt="profile pic"
></img>
</div>
<div className="col-9 col-sm-10 col-md-11 ">
Expand Down
4 changes: 1 addition & 3 deletions src/components/do-post/do-post.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React, { ChangeEventHandler, useState } from "react";
import { useState } from "react";
import styles from "./do-post.module.css";
import axios from "axios";

import { useHistory } from "react-router-dom";
import { MapBox } from "../mapbox/mapbox";
import { dopost } from "../../common/api";
import { ThemeConsumer } from "react-bootstrap/esm/ThemeProvider";

type TTag = {
name: string;
Expand Down
3 changes: 2 additions & 1 deletion src/components/hbox/hbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class hbox extends React.Component {
<img
className={styles.harrow}
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAclBMVEX////7+/sjHyD+/v79/f38/PwkICEAAADW1dUUDhDS0tLy8vL29vYTDA739/dLSUlDQEFGQ0RQTk4aFRc7ODk4NTXs7OxoZmdSUFArJyjFxMRdW1xycXENAwbMy8uNi4ypqKi6ubmgn5+HhYaWlZUdGRqZUNiDAAALB0lEQVR4nO1d63qcOAyFMQyZDnPLpEk3lzbdNu//igvYXGxLxja+wbf8qcvI2AdLHElWIMuwg+ANG1mFiIms9TQJmW2QseFC1vHlFLL0fwVrFGKDFERqSLKyiIksNgety83LUrmSnibl2Oh/KYRG6VqWSLLZjKzJ0FRni5yeJnlO+gbrkLNLlEwky0XZQiVLENlSlFUObSIrTJPqKin1RzEDiMlKk4ZuhhVAcZqdzvaamxjAJas9DE3XrtdX5wCtJo3JSkPrTTMbj8RWcHZok2muAaCVii4HqHyUaauojmyKK7jIBv9XUSOAhP6eEkAnNDHIdow/OENJqKhTG5QY3w1A7RX0boPMHR0ZPzBA7zY4iC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D0RRNLAK6CJrwCTMFVGwCS6enV0oTCBuG6tu3YoPKrZOqe67BBpK5t/a7aeDn2iwHABG1QJwHvAWAKnowAsBQXFvBiB+Uu9WUlkWIUKeaGLuShLabJBPtoSmoU/XsjJw1JVhZBZUuNy5kMPSvLBAnWIGNjgYgvWaIjqzitNxHnspm5rFLkP3CxKV4lL5XVAAAAAElFTkSuQmCC"
alt=""
alt="Arrow"
height="31px"
width="31px"
></img>
Expand All @@ -23,6 +23,7 @@ export class hbox extends React.Component {
height="60px"
width="60px"
src="assets/detailed-post/profile-pic.png"
alt="profile pic"
></img>
</div>
<div className="col-8 col-sm-8 ">
Expand Down
2 changes: 1 addition & 1 deletion src/components/help/follow-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function FollowPost(props: RouteProps) {
]);

function getIconName(name: string) {
const findIcon = iconTags.find((e) => e.name == name);
const findIcon = iconTags.find((e) => e.name === name);
return findIcon?.icon;
}
function createMarker(post: postDetailResponse) {
Expand Down
1 change: 0 additions & 1 deletion src/components/landing/landing.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
margin-right: -100%;
margin-left: -20vh;

/* margin-left: calc(100vw / 2 - 120vw); */
margin-top: calc(100vh / 1.2 - var(--size));
}
.world-needs-your-help p {
Expand Down
30 changes: 1 addition & 29 deletions src/components/landing/landing.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
import React, { CSSProperties } from "react";
import { createRef } from "react";
import React from "react";
import { Link } from "react-router-dom";
import { fromEvent } from "rxjs";
import styles from "./landing.module.css";
export class Landing extends React.Component {
helpinHandsGreenCircleRef = createRef<HTMLDivElement>();
constructor(props: any) {
super(props);
}

setCssVars() {
// TODO: Remove
// this.setState({
// helpingHandsCircle: {
// eleHeight: this.helpinHandsGreenCircleRef.current?.offsetHeight + "px",
// eleWidth: this.helpinHandsGreenCircleRef.current?.offsetWidth + "px",
// },
// });
}
componentDidMount() {
this.setCssVars();
fromEvent(window, "resize").subscribe((e) => {
this.setCssVars();
});
}
state = {
helpingHandsCircle: { eleWidth: "0px", eleHeight: "0px" },
worldNeedsYourHelpCirle: { eleWidth: "0px", eleHeight: "0px" },
Expand All @@ -33,14 +12,7 @@ export class Landing extends React.Component {
<div className={styles["landing-container"]}>
<div className={styles["top-circles"]}>
<div
ref={this.helpinHandsGreenCircleRef}
className={styles["helpin-hands-green-circle"]}
style={
{
"--ele-width": this.state.helpingHandsCircle.eleWidth,
"--ele-height": this.state.helpingHandsCircle.eleHeight,
} as CSSProperties
}
>
<p>
Helping
Expand Down
4 changes: 2 additions & 2 deletions src/components/mapbox/mapbox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mapboxgl, { Marker } from "mapbox-gl";
import { useEffect, useRef, useState } from "react";
import mapboxgl from "mapbox-gl";
import { useEffect, useRef } from "react";
import { getLocation } from "../../common/location";
type Props = {
markers?: mapboxgl.Marker[];
Expand Down
3 changes: 1 addition & 2 deletions src/components/signin/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";
import styles from "./signin.module.css";
import { auth } from "../../Services/Firebase";
import { setPhoneNumber, setToken, setUserId } from "../../common/user";
import axios from "axios";
import { handleHttpError, signIn, toggleSpinner } from "../../common/api";
export class Signin extends React.Component {
state = {
Expand Down Expand Up @@ -128,7 +127,7 @@ export class Signin extends React.Component {
className={styles.next1}
onClick={this.onSendotp}
disabled={
!(this.state.name && this.state.phoneNumber.length == 13)
!(this.state.name && this.state.phoneNumber.length === 13)
}
>
{this.state.otpSend?"Resend otp":"Get OTP"}
Expand Down
2 changes: 1 addition & 1 deletion src/components/thankyou/thankyou.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Thankyou extends React.Component {
<p>Change the world by being yourself,</p>
<p>
<Link to={"/home"}>
<a className={styles.anchor} href="#">
<a className={styles.anchor} href="/">
<u>Keep Helping...</u>
</a>
</Link>
Expand Down