Skip to content

Commit

Permalink
Merge pull request #131 from Macktireh/main
Browse files Browse the repository at this point in the history
fix loanding time
  • Loading branch information
Macktireh authored Aug 2, 2024
2 parents ed29933 + 6f99c2d commit cbc02cb
Show file tree
Hide file tree
Showing 21 changed files with 74 additions and 17 deletions.
83 changes: 70 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,89 @@
# Clone the Twitter Frontend with React TS

This repository contains the frontend source code of the Twitter clone project. I used React, TypeScript and Redux to build the user interface of the application.
<p align="center"> <h1 align="center">Frontend Twitter Clone</h1> </p>

## Startup

### Prerequisites
<p align="center">
<!-- <img src="./demo/1.png" alt="Home screen" width=400> -->
<img src="./demo/2.png" alt="Home screen" width=400>
<img src="./demo/3.png" alt="Home screen" width=400>
<img src="./demo/4.png" alt="Home screen" width=400>
<img src="./demo/5.png" alt="Home screen" width=400>
<img src="./demo/6.png" alt="Home screen" width=400>
<img src="./demo/7.png" alt="Home screen" width=400>
<img src="./demo/16.png" alt="Home screen" width=400>
<img src="./demo/17.png" alt="Home screen" width=400>
<img src="./demo/9.png" alt="Home screen" width=400>
<img src="./demo/15.png" alt="Home screen" width=400>
<img src="./demo/11.png" alt="Home screen" width=400>
<img src="./demo/10.png" alt="Home screen" width=400>
<img src="./demo/12.png" alt="Home screen" width=400>
<img src="./demo/13.png" alt="Home screen" width=400>
<img src="./demo/14.png" alt="Home screen" width=400>
<img src="./demo/18.png" alt="Home screen" width=400>
</p>

- Nodejs
- Git
## Table of Contents
- [Description](#description)
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)

### Installation

#### 1. Clone the git repository
## Description

If you have `Git` on your computer, use the commands below, otherwise just download the project.
This project provides the frontend for a Twitter clone. It is built using React, Redux, Axios for state management and API requests. The application is fully responsive and works seamlessly on various devices. It also supports PWA features, allowing it to be installed on devices for a native-like experience.

```bash
git clone https://github.com/Macktireh/clone-twitter-frontend.git clone-twitter-backend
```
The backend for this project is implemented using Django, Django REST framework, Django Channels, PostgreSQL, Redis, and Cloudinary, and can be found [clone-twitter-backend](https://github.com/Macktireh/clone-twitter-backend).

```bash


## Features

- **Authentication**: User signup, login, and logout.
- **Tweets**: Create, read, update, and delete tweets.
- **Likes**: Like and unlike tweets.
- **Bookmarks**: Bookmark and remove bookmarks from tweets.
- **Retweets**: Retweet and undo retweet.
- **User Profiles**: View and edit user profiles, follow and unfollow users.
- **Notifications**: Real-time notifications for user interactions.
- **Real-Time Chat**: Real-time chat feature using WebSockets.
- **Responsive Design**: Fully responsive layout for various screen sizes.
- **PWA**: Progressive Web App support for a native-like experience.


## Prerequisites

- Node.js
- npm


## Getting Started

1. Clone the repository:

```sh
git clone https://github.com/Macktireh/clone-twitter-backend.git
```
```sh
cd clone-twitter-backend
```

2. Install dependencies:


```bash
npm install
```

3. Start the development server:

```bash
npm start
```

The frontend of your Twitter clone should now be up and running. Visit http://localhost:3000 to see the application in action. 🎉


## License

This project is licensed under the [MIT License](LICENSE).
Binary file added demo/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const App: React.FC<propsTypes> = ({ getCurrentUserAction }) => {
if (!flag.current) {
(async () => {
await getCurrentUserAction();
setTimeout(() => setLoading(false), 800);
setTimeout(() => setLoading(false), 2500);
flag.current = true;
})();
}
Expand Down
6 changes: 3 additions & 3 deletions src/helper/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const AuthProvider: React.FC<TProps> = ({ isPublic, isAuthenticated, children, g
let [searchParams, setSearchParams] = useSearchParams();

React.useEffect(() => {
const code = searchParams.get("code")
if (code && isAuthenticated === false || isAuthenticated === null) {
const code = searchParams.get("code")
if (code && (isAuthenticated === false || isAuthenticated === null)) {
(async () => {
await googleLoginAction( code );
setTimeout(() => setLoading(false), 800);
setTimeout(() => setLoading(false), 1000);
})();
} else if (isAuthenticated !== null) setLoading(false);
}, [loading, isAuthenticated]);
Expand Down

0 comments on commit cbc02cb

Please sign in to comment.