completed feature
This commit is contained in:
commit
54e26c9e4d
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"projectName": "url-minify",
|
||||
"projectOwner": "BRAVO68WEB",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com",
|
||||
"files": [
|
||||
"README.md"
|
||||
],
|
||||
"imageSize": 55,
|
||||
"commit": true,
|
||||
"commitConvention": "none",
|
||||
"contributors": [
|
||||
{
|
||||
"login": "para-docx",
|
||||
"name": "Dhruv Pruthi",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/72385299?v=4",
|
||||
"profile": "https://github.com/para-docx",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "chirag3003",
|
||||
"name": "Chirag Bhalotia",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/68195580?v=4",
|
||||
"profile": "https://github.com/chirag3003",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dakshgupta2002",
|
||||
"name": "Daksh Gupta",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/78641951?v=4",
|
||||
"profile": "https://github.com/dakshgupta2002",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "logan4473",
|
||||
"name": "Logan",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/69055524?v=4",
|
||||
"profile": "https://github.com/logan4473",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "DarkFalc0n",
|
||||
"name": "Pratyay Roy",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/59203815?v=4",
|
||||
"profile": "https://github.com/DarkFalc0n",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "luxunator",
|
||||
"name": "luxunator",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/50147562?v=4",
|
||||
"profile": "https://github.com/luxunator",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "aaheli8",
|
||||
"name": "Aaheli Sadhukhan",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/66815283?v=4",
|
||||
"profile": "https://github.com/aaheli8",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "XxThunderBlastxX",
|
||||
"name": "Koustav Mondal",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/74706101?v=4",
|
||||
"profile": "https://github.com/XxThunderBlastxX",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"skipCi": true
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"0 debug pnpm:scope": {
|
||||
"selected": 1
|
||||
},
|
||||
"1 error pnpm": {
|
||||
"code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND",
|
||||
"err": {
|
||||
"name": "pnpm",
|
||||
"message": "No package.json (or package.yaml, or package.json5) was found in \"/home/chirag/Desktop/jwoc/url-minify\".",
|
||||
"code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND",
|
||||
"stack": "pnpm: No package.json (or package.yaml, or package.json5) was found in \"/home/chirag/Desktop/jwoc/url-minify\".\n at readProjectManifest (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:19808:13)\n at async Object.readProjectManifestOnly (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:19812:28)\n at async readProjectManifestOnly (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:43691:24)\n at async Object.handler (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:177805:24)\n at async /usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:182068:21\n at async run (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:182042:34)\n at async runPnpm (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:182261:5)\n at async /usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:182253:7"
|
||||
}
|
||||
}
|
||||
}
|
57
README.md
57
README.md
|
@ -1,4 +1,7 @@
|
|||
<h1 align="center">Welcome to url-minify 👋</h1>
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
<img src="https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square" />
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
<p>
|
||||
<a href="LICENSE" target="_blank">
|
||||
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
|
||||
|
@ -10,12 +13,11 @@
|
|||
|
||||
<br />
|
||||
|
||||
<img src="frontend/assets/logo/url-minify.jpg" />
|
||||
<img src="https://user-images.githubusercontent.com/41448663/153746139-237f8e4d-be25-4f04-91ec-2bb3ff6f0e34.png" />
|
||||
|
||||
<br />
|
||||
|
||||
> A URL shortener build with Nextjs, ExpressJS, MongoDB
|
||||
|
||||
> A URL shortener build with Nextjs, ExpressJS, MongoDB
|
||||
|
||||
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)
|
||||
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white&color=green)
|
||||
|
@ -38,7 +40,7 @@ cd backend && npm install
|
|||
## Usage
|
||||
|
||||
```sh
|
||||
# Running Frondend
|
||||
# Running Frondend
|
||||
npm run start
|
||||
|
||||
# Running Backend
|
||||
|
@ -49,15 +51,52 @@ npm run start
|
|||
|
||||
👤 **BRAVO68WEB**
|
||||
|
||||
* Website: https://bravo68web.me
|
||||
* Twitter: [@BRAVO68WEB](https://twitter.com/BRAVO68WEB)
|
||||
* Github: [@BRAVO68WEB](https://github.com/BRAVO68WEB)
|
||||
* LinkedIn: [@BRAVO68WEB](https://linkedin.com/in/BRAVO68WEB)
|
||||
- Website: https://bravo68web.me
|
||||
- Twitter: [@BRAVO68WEB](https://twitter.com/BRAVO68WEB)
|
||||
- Github: [@BRAVO68WEB](https://github.com/BRAVO68WEB)
|
||||
- LinkedIn: [@BRAVO68WEB](https://linkedin.com/in/BRAVO68WEB)
|
||||
|
||||
## Participations
|
||||
|
||||
### Current
|
||||
|
||||
- JWOC (https://jwoc.tech) <br> <img src="https://jwoc.tech/assets/img/opengraph.png" height=75px/>
|
||||
|
||||
### Past
|
||||
|
||||
- None
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/BRAVO68WEB/url-minify/issues). You can also take a look at the [contributing guide](CONTRIBUTING.md).
|
||||
|
||||
## Contributors ✨
|
||||
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/para-docx"><img src="https://avatars.githubusercontent.com/u/72385299?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Dhruv Pruthi</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=para-docx" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/chirag3003"><img src="https://avatars.githubusercontent.com/u/68195580?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Chirag Bhalotia</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=chirag3003" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/dakshgupta2002"><img src="https://avatars.githubusercontent.com/u/78641951?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Daksh Gupta</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=dakshgupta2002" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/logan4473"><img src="https://avatars.githubusercontent.com/u/69055524?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Logna</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=logan4473" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/DarkFalc0nx"><img src="https://avatars.githubusercontent.com/u/59203815?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Pratyay Roy</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=DarkFalc0nx" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/luxunator"><img src="https://avatars.githubusercontent.com/u/50147562?v=4?s=55" width="55px;" alt=""/><br /><sub><b>luxunator</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=luxunator" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/aaheli8"><img src="https://avatars.githubusercontent.com/u/66815283?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Aaheli Sadhukhan</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=aaheli8" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/XxThunderBlastxX"><img src="https://avatars.githubusercontent.com/u/74706101?v=4?s=55" width="55px;" alt=""/><br /><sub><b>Koustav Mondal</b></sub></a><br /><a href="https://github.com/BRAVO68WEB/url-minify/commits?author=XxThunderBlastxX" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
## Show your support
|
||||
|
||||
Give a ⭐️ if this project helped you!
|
||||
|
@ -66,3 +105,5 @@ Give a ⭐️ if this project helped you!
|
|||
|
||||
Copyright © 2022 [BRAVO68WEB](https://github.com/BRAVO68WEB).<br />
|
||||
This project is [MIT](LICENSE) licensed.
|
||||
|
||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
|
|
@ -15,12 +15,15 @@ module.exports.getAllData = async (req, res) => {
|
|||
|
||||
module.exports.getURLData = async (req, res) => {
|
||||
try {
|
||||
const { alias } = req.params
|
||||
const data = await Minfy.findOne({
|
||||
alias: alias,
|
||||
alias: req.params.alias,
|
||||
})
|
||||
data.minifiedUrl = base_url + data.alias
|
||||
return res.json(data)
|
||||
// data.minifiedUrl = base_url + data.alias
|
||||
if (!data || data == null) {
|
||||
return res.json({ success: false, message: 'No data found' })
|
||||
} else {
|
||||
res.json({ success: true, data })
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
res.sendStatus(500)
|
||||
|
|
|
@ -1,55 +1,55 @@
|
|||
const jwt = require("jsonwebtoken");
|
||||
const User = require("../models/user");
|
||||
const jwt = require('jsonwebtoken')
|
||||
const User = require('../models/user')
|
||||
|
||||
|
||||
module.exports.register = async ({ body: { email, password } }, res) => {
|
||||
try{
|
||||
if(!email || !password) return res.sendStatus(400)
|
||||
let oldUser = await User.findOne({ email }).catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
if (oldUser) return res.status(400).send('Already Exists');
|
||||
let user = new User({ email });
|
||||
user.setPassword(password);
|
||||
let validationError = false;
|
||||
await user.save().catch((err) => {
|
||||
validationError = true;
|
||||
return res.sendStatus(400);
|
||||
});
|
||||
if (!validationError) return res.send(user.generateJWT());
|
||||
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
module.exports.register = async ({ body: { email, password } }, res) => {
|
||||
try {
|
||||
if (!email || !password) return res.sendStatus(400)
|
||||
let oldUser = await User.findOne({ email }).catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
if (oldUser) return res.status(400).send('Already Exists')
|
||||
let user = new User({ email })
|
||||
user.setPassword(password)
|
||||
let validationError = false
|
||||
await user.save().catch((err) => {
|
||||
validationError = true
|
||||
return res.sendStatus(400)
|
||||
})
|
||||
if (!validationError) return res.send(user.generateJWT())
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
}
|
||||
module.exports.login = async ({ body: { email, password } }, res) => {
|
||||
try{
|
||||
if (!email || !password) return res.sendStatus(400)
|
||||
let user = await User.findOne({email}).catch((err) => console.error(err));
|
||||
try {
|
||||
if (!email || !password) return res.sendStatus(400)
|
||||
let user = await User.findOne({ email }).catch((err) =>
|
||||
console.error(err)
|
||||
)
|
||||
|
||||
if (user && user.validatePassword(password))
|
||||
return res.json({access_token:user.generateJWT()});
|
||||
return res.status(401).send(null);
|
||||
}catch(err) {
|
||||
console.log(err)
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
if (user && user.validatePassword(password))
|
||||
return res.json({ access_token: user.generateJWT() })
|
||||
return res.status(401).send(null)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
}
|
||||
module.exports.me= async (req, res) => {
|
||||
try{
|
||||
if (!req.user.isAuthenticated) {
|
||||
res.sendStatus(401);
|
||||
return;
|
||||
}
|
||||
let user = req.user.data;
|
||||
res.send({
|
||||
email: user.email,
|
||||
name: user.name,
|
||||
phone: user.phone,
|
||||
});
|
||||
}catch (e){
|
||||
console.log(e)
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
module.exports.me = async (req, res) => {
|
||||
try {
|
||||
if (!req.user.isAuthenticated) {
|
||||
res.sendStatus(401)
|
||||
return
|
||||
}
|
||||
let user = req.user.data
|
||||
res.send({
|
||||
email: user.email,
|
||||
name: user.name,
|
||||
phone: user.phone,
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const express = require('express')
|
||||
const cors = require('cors');
|
||||
const cors = require('cors')
|
||||
const http = require('http')
|
||||
const { urlencoded, json } = require('body-parser')
|
||||
const session = require('express-session')
|
||||
|
@ -10,7 +10,7 @@ require('dotenv').config()
|
|||
const app = express()
|
||||
|
||||
app.use(express.json())
|
||||
app.use(cors());
|
||||
app.use(cors())
|
||||
app.use(json())
|
||||
app.use(
|
||||
urlencoded({
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
const jwt = require("jsonwebtoken");
|
||||
const User = require("../models/user")
|
||||
|
||||
const jwt = require('jsonwebtoken')
|
||||
const User = require('../models/user')
|
||||
|
||||
module.exports.auth = async (req, res, next) => {
|
||||
let user = {isAuthenticated:false};
|
||||
if (req.headers.authorization && req.headers.authorization !== null) {
|
||||
try {
|
||||
let jwtData = jwt.verify(
|
||||
req.headers.authorization.replace("Bearer ", ""),
|
||||
process.env.AUTH_SECRET
|
||||
);
|
||||
let userData = await User.findOne({
|
||||
email: jwtData.email,
|
||||
hash: jwtData.hash,
|
||||
}).catch((err) => console.error(err));
|
||||
user.isAuthenticated = userData ? true : false;
|
||||
user.data = userData;
|
||||
} catch (err) {
|
||||
user.isAuthenticated = false;
|
||||
user.data = null;
|
||||
}
|
||||
}
|
||||
req.user = user;
|
||||
next();
|
||||
}
|
||||
let user = { isAuthenticated: false }
|
||||
if (req.headers.authorization && req.headers.authorization !== null) {
|
||||
try {
|
||||
let jwtData = jwt.verify(
|
||||
req.headers.authorization.replace('Bearer ', ''),
|
||||
process.env.AUTH_SECRET
|
||||
)
|
||||
let userData = await User.findOne({
|
||||
email: jwtData.email,
|
||||
hash: jwtData.hash,
|
||||
}).catch((err) => console.error(err))
|
||||
user.isAuthenticated = userData ? true : false
|
||||
user.data = userData
|
||||
} catch (err) {
|
||||
user.isAuthenticated = false
|
||||
user.data = null
|
||||
}
|
||||
}
|
||||
req.user = user
|
||||
next()
|
||||
}
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
const mongoose = require('mongoose')
|
||||
const { Schema } = mongoose
|
||||
|
||||
//build a schema
|
||||
const minifiedUrlSchema = new Schema(
|
||||
{
|
||||
originalUrl: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
alias: {
|
||||
type: String,
|
||||
required: true,
|
||||
unique: true,
|
||||
},
|
||||
minifiedUrl: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
views: {
|
||||
type: Number,
|
||||
},
|
||||
createdBy: {
|
||||
type: String,
|
||||
default: 'Anonymous',
|
||||
}
|
||||
},
|
||||
{ timestamp: true }
|
||||
)
|
||||
//make a model using this schema and export it
|
||||
module.exports = mongoose.model('minified_url_model', minifiedUrlSchema)
|
||||
const mongoose = require('mongoose')
|
||||
const { Schema } = mongoose
|
||||
|
||||
//build a schema
|
||||
const minifiedUrlSchema = new Schema(
|
||||
{
|
||||
originalUrl: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
alias: {
|
||||
type: String,
|
||||
required: true,
|
||||
unique: true,
|
||||
},
|
||||
minifiedUrl: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
views: {
|
||||
type: Number,
|
||||
},
|
||||
createdBy: {
|
||||
type: String,
|
||||
default: 'Anonymous',
|
||||
},
|
||||
},
|
||||
{ timestamp: true }
|
||||
)
|
||||
//make a model using this schema and export it
|
||||
module.exports = mongoose.model('minified_url_model', minifiedUrlSchema)
|
||||
|
|
|
@ -1,63 +1,63 @@
|
|||
const mongoose = require("mongoose");
|
||||
const crypto = require("crypto");
|
||||
const jwt = require("jsonwebtoken");
|
||||
const mongoose = require('mongoose')
|
||||
const crypto = require('crypto')
|
||||
const jwt = require('jsonwebtoken')
|
||||
|
||||
const { Schema } = mongoose;
|
||||
const { Schema } = mongoose
|
||||
|
||||
const UsersSchema = new Schema(
|
||||
{
|
||||
email: {
|
||||
type: String,
|
||||
unique: true,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
// required: true,
|
||||
},
|
||||
hash: String,
|
||||
salt: String,
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
);
|
||||
{
|
||||
email: {
|
||||
type: String,
|
||||
unique: true,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
// required: true,
|
||||
},
|
||||
hash: String,
|
||||
salt: String,
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
)
|
||||
|
||||
UsersSchema.methods.setPassword = function (password) {
|
||||
this.salt = crypto.randomBytes(16).toString("hex");
|
||||
this.hash = crypto
|
||||
.pbkdf2Sync(password, this.salt, 10000, 512, "sha512")
|
||||
.toString("hex");
|
||||
};
|
||||
this.salt = crypto.randomBytes(16).toString('hex')
|
||||
this.hash = crypto
|
||||
.pbkdf2Sync(password, this.salt, 10000, 512, 'sha512')
|
||||
.toString('hex')
|
||||
}
|
||||
|
||||
UsersSchema.methods.validatePassword = function (password) {
|
||||
const hash = crypto
|
||||
.pbkdf2Sync(password, this.salt, 10000, 512, "sha512")
|
||||
.toString("hex");
|
||||
return this.hash === hash;
|
||||
};
|
||||
const hash = crypto
|
||||
.pbkdf2Sync(password, this.salt, 10000, 512, 'sha512')
|
||||
.toString('hex')
|
||||
return this.hash === hash
|
||||
}
|
||||
|
||||
UsersSchema.methods.generateJWT = function () {
|
||||
const today = new Date();
|
||||
const expirationDate = new Date(today);
|
||||
expirationDate.setDate(today.getDate() + 60);
|
||||
const today = new Date()
|
||||
const expirationDate = new Date(today)
|
||||
expirationDate.setDate(today.getDate() + 60)
|
||||
|
||||
return jwt.sign(
|
||||
{
|
||||
email: this.email,
|
||||
hash: this.hash,
|
||||
id: this._id,
|
||||
exp: parseInt(String(expirationDate.getTime() / 1000), 10),
|
||||
},
|
||||
process.env.AUTH_SECRET
|
||||
);
|
||||
};
|
||||
return jwt.sign(
|
||||
{
|
||||
email: this.email,
|
||||
hash: this.hash,
|
||||
id: this._id,
|
||||
exp: parseInt(String(expirationDate.getTime() / 1000), 10),
|
||||
},
|
||||
process.env.AUTH_SECRET
|
||||
)
|
||||
}
|
||||
|
||||
UsersSchema.methods.toAuthJSON = function () {
|
||||
return {
|
||||
id: this._id,
|
||||
email: this.email,
|
||||
token: this.generateJWT(),
|
||||
};
|
||||
};
|
||||
return {
|
||||
id: this._id,
|
||||
email: this.email,
|
||||
token: this.generateJWT(),
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = mongoose.model("users", UsersSchema);
|
||||
module.exports = mongoose.model('users', UsersSchema)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,7 +4,7 @@ const router = express.Router()
|
|||
const homeController = require('../controllers/home_controller')
|
||||
|
||||
router.get('/', homeController.home)
|
||||
router.use("/minify", require("./minify"))
|
||||
router.use('/user', require("./user"))
|
||||
router.use('/minify', require('./minify'))
|
||||
router.use('/user', require('./user'))
|
||||
|
||||
module.exports = router
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
const {Router} = require("express")
|
||||
const controller = require("../controllers/minify")
|
||||
const {auth} = require("../middlewares/auth")
|
||||
const { Router } = require('express')
|
||||
const controller = require('../controllers/minify')
|
||||
const { auth } = require('../middlewares/auth')
|
||||
|
||||
const router = Router();
|
||||
const router = Router()
|
||||
|
||||
router.get("/all", controller.getAllData)
|
||||
router.get("/id/:id", controller.findUrlById)
|
||||
router.get("/alias/:alias", controller.getURLData)
|
||||
router.get('/all', controller.getAllData)
|
||||
router.get('/id/:id', controller.findUrlById)
|
||||
router.get('/alias/:alias', controller.getURLData)
|
||||
|
||||
router.post("/add",controller.addURL)
|
||||
router.post("/add/custom",auth,controller.addURLAuthed)
|
||||
router.post('/add', controller.addURL)
|
||||
router.post('/add/custom', auth, controller.addURLAuthed)
|
||||
|
||||
router.patch('/edit/:id', auth, controller.updateUrlData)
|
||||
|
||||
router.delete('/delete/:id',auth,controller.deleteUrlData)
|
||||
router.delete('/delete/:id', auth, controller.deleteUrlData)
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
const {Router} = require("express")
|
||||
const controller = require("../controllers/user")
|
||||
const {auth} = require("../middlewares/auth")
|
||||
const { Router } = require('express')
|
||||
const controller = require('../controllers/user')
|
||||
const { auth } = require('../middlewares/auth')
|
||||
|
||||
const router = Router();
|
||||
const router = Router()
|
||||
|
||||
router.post('/login',controller.login )
|
||||
router.post('/login', controller.login)
|
||||
router.post('/register', controller.register)
|
||||
router.get('/me',auth, controller.me)
|
||||
router.get('/me', auth, controller.me)
|
||||
|
||||
module.exports = router
|
||||
module.exports = router
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
NODE_ENV=dev
|
||||
NEXT_PUBLIC_API_URL=http://localhost:5000
|
||||
NEXT_PUBLIC_API_URL=http://localhost:5000
|
||||
|
|
|
@ -4,7 +4,7 @@ export default styled.div`
|
|||
.sidebar{
|
||||
float: left;
|
||||
width: 20%;
|
||||
height: 600px;
|
||||
height: 100vh;
|
||||
}
|
||||
.nav-item {
|
||||
margin: 2.5rem;
|
||||
|
@ -23,7 +23,7 @@ export default styled.div`
|
|||
|
||||
.column {
|
||||
flex: 30%;
|
||||
height: 200px;
|
||||
height: 250px;
|
||||
}
|
||||
.list2{
|
||||
margin-bottom: 10px;
|
||||
|
|
|
@ -1,42 +1,82 @@
|
|||
import * as React from 'react';
|
||||
import { Avatar, Box, Button, Container, IconButton, Menu, MenuItem, Toolbar, Tooltip, Typography, alpha, AppBar } from "@mui/material";
|
||||
import * as React from "react";
|
||||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
IconButton,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Toolbar,
|
||||
Tooltip,
|
||||
Typography,
|
||||
alpha,
|
||||
AppBar,
|
||||
} from "@mui/material";
|
||||
|
||||
import QrCodeScannerIcon from '@mui/icons-material/QrCodeScanner';
|
||||
import RocketLaunchIcon from '@mui/icons-material/RocketLaunch';
|
||||
import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
|
||||
import QrCodeScannerIcon from "@mui/icons-material/QrCodeScanner";
|
||||
import RocketLaunchIcon from "@mui/icons-material/RocketLaunch";
|
||||
import RemoveRedEyeIcon from "@mui/icons-material/RemoveRedEye";
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
|
||||
<Box sx={{ flexGrow: 1, display: 'flex', flexDirection: 'column', alignItems: 'center', my: 2 }}>
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
my: 2,
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<h1> SHORTEN, SHARE AND ANALYZE</h1>
|
||||
<br />
|
||||
</Box>
|
||||
<Box sx={{ flexGrow: 1, display: 'flex', justifyContent:'space-around', alignContent:'space-around', alignItems: 'space-around', width:'50vw'}}>
|
||||
|
||||
<Box style={{ display: 'flex', flexDirection: 'column', justifyContent: 'centre', alignItems: 'center', }}>
|
||||
<RemoveRedEyeIcon sx={{ width: '3.5rem', height: '3.5rem' }} />
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
display: "flex",
|
||||
justifyContent: "space-around",
|
||||
alignContent: "space-around",
|
||||
alignItems: "space-around",
|
||||
width: "50vw",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "centre",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<RemoveRedEyeIcon sx={{ width: "3.5rem", height: "3.5rem" }} />
|
||||
<h4>VIEW COUNTER</h4>
|
||||
</Box>
|
||||
<Box style={{ display: 'flex', flexDirection: 'column', justifyContent: 'centre', alignItems: 'center', }}>
|
||||
<QrCodeScannerIcon sx={{ width: '3.5rem', height: '3.5rem' }} />
|
||||
<Box
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "centre",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<QrCodeScannerIcon sx={{ width: "3.5rem", height: "3.5rem" }} />
|
||||
<h4>QR CODE</h4>
|
||||
</Box>
|
||||
<Box style={{ display: 'flex', flexDirection: 'column', justifyContent: 'centre', alignItems: 'center', }}>
|
||||
<RocketLaunchIcon sx={{ width: '3.5rem', height: '3.5rem' }} />
|
||||
<Box
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "centre",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<RocketLaunchIcon sx={{ width: "3.5rem", height: "3.5rem" }} />
|
||||
<h4>ROBUST API</h4>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
</Box>
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import styled from "styled-components"
|
||||
import styled from "styled-components";
|
||||
|
||||
export default styled.section`
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
flex-direction:column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
`
|
||||
`;
|
||||
|
|
|
@ -1,80 +1,114 @@
|
|||
import React from "react";
|
||||
import React, {useState} from "react";
|
||||
import HomeSectionStyle from "./HomeSection.style";
|
||||
import Link from "next/link";
|
||||
import Axios from "helpers/Axios";
|
||||
import {Alert, Button, Collapse, IconButton} from "@mui/material";
|
||||
import CloseIcon from '@mui/icons-material/Close';
|
||||
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
||||
|
||||
const head = {
|
||||
fontSize: "5rem",
|
||||
fontWeight: "bold",
|
||||
marginBottom: "30px",
|
||||
fontSize: "5.5rem",
|
||||
fontWeight: "bold",
|
||||
color:"white",
|
||||
marginBottom: "30px",
|
||||
};
|
||||
const box = {
|
||||
fontSize: "1.5em",
|
||||
borderRadius: "50px",
|
||||
padding: "1em",
|
||||
width: "500px",
|
||||
height: "50px",
|
||||
fontSize: "1.5em",
|
||||
borderRadius: "50px",
|
||||
padding: "1em",
|
||||
width: "500px",
|
||||
height: "50px",
|
||||
outline:"none !important",
|
||||
border:"none !important",
|
||||
marginBottom:"15px"
|
||||
};
|
||||
const btn = {
|
||||
fontWeight: "bold",
|
||||
position: "absolute",
|
||||
alignItems: "center",
|
||||
right: "0px",
|
||||
marginRight: "5px",
|
||||
marginTop: "4.5px",
|
||||
marginBottom: "3px",
|
||||
height: "40px",
|
||||
width: "100px",
|
||||
borderRadius: "50px",
|
||||
fontWeight: "bold",
|
||||
position: "absolute",
|
||||
alignItems: "center",
|
||||
right: "0px",
|
||||
marginRight: "5px",
|
||||
marginTop: "4.5px",
|
||||
marginBottom: "3px",
|
||||
height: "40px",
|
||||
width: "100px",
|
||||
borderRadius: "50px",
|
||||
};
|
||||
const searchBox = {
|
||||
position: "relative",
|
||||
position: "relative",
|
||||
};
|
||||
function HomeSection(props) {
|
||||
const setMinfy = async () => {
|
||||
let res;
|
||||
try {
|
||||
res = await Axios.post(`/minify/add`, {
|
||||
originalUrl: props.longUrl,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
const [disabled,setDisabled] = useState(false)
|
||||
const [open, setOpen] = React.useState(false);
|
||||
|
||||
const data = await res.data;
|
||||
props.setShortUrl(data.minifiedUrl);
|
||||
navigator.clipboard.writeText(props.shortUrl);
|
||||
};
|
||||
const setMinfy = async () => {
|
||||
setOpen(false)
|
||||
setDisabled(true);
|
||||
let res;
|
||||
try {
|
||||
res = await Axios.post(`/minify/add`, {
|
||||
originalUrl: props.longUrl,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
return (
|
||||
<HomeSectionStyle>
|
||||
<div className="content">
|
||||
<h1 style={head} className="title">
|
||||
URL MINIFY
|
||||
</h1>
|
||||
const data = await res.data;
|
||||
props.setShortUrl(data.minifiedUrl);
|
||||
await navigator.clipboard.writeText(data.minifiedUrl);
|
||||
setOpen(true)
|
||||
setDisabled(false)
|
||||
};
|
||||
|
||||
<div style={searchBox}>
|
||||
<input
|
||||
style={box}
|
||||
placeholder="Enter the url to be minified......"
|
||||
value={props.longUrl}
|
||||
onChange={(e) => {
|
||||
props.setLongUrl(e.target.value);
|
||||
}}
|
||||
/>
|
||||
<button style={btn} id="minify" onClick={setMinfy}>
|
||||
MINIFY
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<h3>
|
||||
Need more advanced features? | <Link href="/signup">Create an account</Link>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</HomeSectionStyle>
|
||||
);
|
||||
return (
|
||||
<HomeSectionStyle>
|
||||
<div className="content">
|
||||
<h1 style={head} className="title">
|
||||
URL MINIFY
|
||||
</h1>
|
||||
|
||||
<div style={searchBox}>
|
||||
<input
|
||||
style={box}
|
||||
placeholder="Enter the url to be minified......"
|
||||
value={props.longUrl}
|
||||
onChange={(e) => {
|
||||
props.setLongUrl(e.target.value);
|
||||
}}
|
||||
/>
|
||||
<Button variant={"contained"} disabled={disabled} style={btn} id="minify" onClick={setMinfy}>
|
||||
MINIFY
|
||||
</Button>
|
||||
</div>
|
||||
<div style={{marginBottom:"40px",color:"#fff"}}>
|
||||
<h3>
|
||||
Need more advanced features? |{" "}
|
||||
<Link href="/signup"><span style={{textDecoration:"underline"}}>Create an account</span></Link>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<Collapse in={open}>
|
||||
<Alert
|
||||
action={
|
||||
<IconButton
|
||||
aria-label="close"
|
||||
color="inherit"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setOpen(false);
|
||||
}}
|
||||
>
|
||||
<CloseIcon fontSize="inherit" />
|
||||
</IconButton>
|
||||
}
|
||||
sx={{ mb: 2 }}
|
||||
>
|
||||
Your Shortened URL: {props.shortUrl} <IconButton onClick={() => navigator.clipboard.writeText(props.shortUrl)} style={{marginLeft:"15px",padding:0}}><ContentCopyIcon /></IconButton>
|
||||
</Alert>
|
||||
</Collapse>
|
||||
</HomeSectionStyle>
|
||||
);
|
||||
}
|
||||
|
||||
export default HomeSection;
|
||||
|
|
|
@ -1,13 +1,26 @@
|
|||
import React from 'react';
|
||||
import React from "react";
|
||||
|
||||
export default function Logo(){
|
||||
|
||||
return(
|
||||
export default function Logo() {
|
||||
return (
|
||||
<div className="logo-wrapper">
|
||||
<svg class="logo" data-name="Layer 4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 53.4 53.31"><path d="M58.84,53.91a9.2,9.2,0,0,1-6.54-2.72L50.14,49a2.59,2.59,0,1,1,3.67-3.66L56,47.53a4.07,4.07,0,0,0,5.76,0L75.24,34.08a4.08,4.08,0,0,0,0-5.76L70.94,24a4.08,4.08,0,0,0-5.76,0l-6.76,6.73A2.59,2.59,0,0,1,54.76,27l6.76-6.73a9.27,9.27,0,0,1,13.09,0l4.31,4.33a9.27,9.27,0,0,1,0,13.09L65.39,51.21A9.22,9.22,0,0,1,58.84,53.91Z" transform="translate(-28.21 -17.61)" fill="#fff"/><path d="M41.77,70.93a9.28,9.28,0,0,1-6.55-2.72l-4.31-4.33a9.27,9.27,0,0,1,0-13.09L44.44,37.33a9.26,9.26,0,0,1,13.09,0l2.16,2.16A2.59,2.59,0,1,1,56,43.17L53.86,41a4.07,4.07,0,0,0-5.76,0L34.59,54.46a4.08,4.08,0,0,0,0,5.76l4.32,4.33a4.08,4.08,0,0,0,5.76,0l6.75-6.73a2.59,2.59,0,1,1,3.66,3.67l-6.75,6.73A9.26,9.26,0,0,1,41.77,70.93Z" transform="translate(-28.21 -17.61)" fill="#fff"/></svg>
|
||||
<p className="logo-text">
|
||||
URL MINIFY
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
<svg
|
||||
class="logo"
|
||||
data-name="Layer 4"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 53.4 53.31"
|
||||
>
|
||||
<path
|
||||
d="M58.84,53.91a9.2,9.2,0,0,1-6.54-2.72L50.14,49a2.59,2.59,0,1,1,3.67-3.66L56,47.53a4.07,4.07,0,0,0,5.76,0L75.24,34.08a4.08,4.08,0,0,0,0-5.76L70.94,24a4.08,4.08,0,0,0-5.76,0l-6.76,6.73A2.59,2.59,0,0,1,54.76,27l6.76-6.73a9.27,9.27,0,0,1,13.09,0l4.31,4.33a9.27,9.27,0,0,1,0,13.09L65.39,51.21A9.22,9.22,0,0,1,58.84,53.91Z"
|
||||
transform="translate(-28.21 -17.61)"
|
||||
fill="#fff"
|
||||
/>
|
||||
<path
|
||||
d="M41.77,70.93a9.28,9.28,0,0,1-6.55-2.72l-4.31-4.33a9.27,9.27,0,0,1,0-13.09L44.44,37.33a9.26,9.26,0,0,1,13.09,0l2.16,2.16A2.59,2.59,0,1,1,56,43.17L53.86,41a4.07,4.07,0,0,0-5.76,0L34.59,54.46a4.08,4.08,0,0,0,0,5.76l4.32,4.33a4.08,4.08,0,0,0,5.76,0l6.75-6.73a2.59,2.59,0,1,1,3.66,3.67l-6.75,6.73A9.26,9.26,0,0,1,41.77,70.93Z"
|
||||
transform="translate(-28.21 -17.61)"
|
||||
fill="#fff"
|
||||
/>
|
||||
</svg>
|
||||
<p className="logo-text">URL MINIFY</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import styled from "styled-components"
|
||||
import {AppBar} from "@mui/material";
|
||||
import styled from "styled-components";
|
||||
import { AppBar } from "@mui/material";
|
||||
|
||||
export default styled(AppBar)``
|
||||
export default styled(AppBar)``;
|
||||
|
|
|
@ -1,136 +1,182 @@
|
|||
import React from 'react';
|
||||
import {Avatar, Box, Button, Container, IconButton, Menu, MenuItem, Toolbar, Tooltip, Typography,alpha} from "@mui/material";
|
||||
import GitHubIcon from '@mui/icons-material/GitHub';
|
||||
import MenuIcon from '@mui/icons-material/Menu';
|
||||
import React from "react";
|
||||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
IconButton,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Toolbar,
|
||||
Tooltip,
|
||||
Typography,
|
||||
alpha,
|
||||
} from "@mui/material";
|
||||
import GitHubIcon from "@mui/icons-material/GitHub";
|
||||
import MenuIcon from "@mui/icons-material/Menu";
|
||||
import NavbarStyle from "./Navbar.style";
|
||||
import Logo from './Logo';
|
||||
import Logo from "./Logo";
|
||||
|
||||
const settings = ['Profile', 'Account', 'Dashboard', 'Logout'];
|
||||
const settings = ["Profile", "Account", "Dashboard", "Logout"];
|
||||
|
||||
function Index(props) {
|
||||
const [anchorElNav, setAnchorElNav] = React.useState(null);
|
||||
const [anchorElUser, setAnchorElUser] = React.useState(null);
|
||||
const [anchorElNav, setAnchorElNav] = React.useState(null);
|
||||
const [anchorElUser, setAnchorElUser] = React.useState(null);
|
||||
|
||||
const handleOpenNavMenu = (event) => {
|
||||
setAnchorElNav(event.currentTarget);
|
||||
};
|
||||
const handleOpenUserMenu = (event) => {
|
||||
setAnchorElUser(event.currentTarget);
|
||||
};
|
||||
const handleOpenNavMenu = (event) => {
|
||||
setAnchorElNav(event.currentTarget);
|
||||
};
|
||||
const handleOpenUserMenu = (event) => {
|
||||
setAnchorElUser(event.currentTarget);
|
||||
};
|
||||
|
||||
const handleCloseNavMenu = () => {
|
||||
setAnchorElNav(null);
|
||||
};
|
||||
const handleCloseNavMenu = () => {
|
||||
setAnchorElNav(null);
|
||||
};
|
||||
|
||||
const handleCloseUserMenu = () => {
|
||||
setAnchorElUser(null);
|
||||
};
|
||||
const handleCloseUserMenu = () => {
|
||||
setAnchorElUser(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<NavbarStyle position="relative" sx={{bgcolor:alpha('#000000',0.50),m:'0px'}}>
|
||||
<Container maxWidth="xl">
|
||||
<Toolbar disableGutters="false">
|
||||
<Typography variant='h4' sx={{fontWeight:'bold'}}>
|
||||
URL MINIFY
|
||||
</Typography>
|
||||
<Box sx={{ flexGrow: 1,flexDirection:'row-reverse', display: { xs: 'flex', md: 'none' } }}>
|
||||
|
||||
<IconButton
|
||||
size="large"
|
||||
aria-label="account of current user"
|
||||
aria-controls="menu-appbar"
|
||||
aria-haspopup="true"
|
||||
onClick={handleOpenNavMenu}
|
||||
color="inherit"
|
||||
>
|
||||
<MenuIcon />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="menu-appbar"
|
||||
anchorEl={anchorElNav}
|
||||
anchorOrigin={{
|
||||
vertical: 'bottom',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
open={Boolean(anchorElNav)}
|
||||
onClose={handleCloseNavMenu}
|
||||
sx={{
|
||||
display: { xs: 'block', md: 'none' },
|
||||
}}
|
||||
>
|
||||
<MenuItem onClick={handleCloseNavMenu}>
|
||||
<a href='https://github.com/BRAVO68WEB/url-minify' target={'_blank'} >
|
||||
<Typography textAlign="center" sx={{display:'flex'}} >
|
||||
<GitHubIcon fontSize='small'/>
|
||||
GitHub
|
||||
</Typography>
|
||||
</a>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleCloseNavMenu}>
|
||||
<Typography textAlign="center" sx={{display:'flex'}} >
|
||||
CRIDITS
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ flexGrow: 1,flexDirection:'row-reverse',gap:'10px',px:'20px', display: { xs: 'none', md: 'flex' } }}>
|
||||
<a href='https://github.com/BRAVO68WEB/url-minify' target={'_blank'} >
|
||||
<Button
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{ color: 'white', display: 'flex',gap:'10px',fontSize:'h5.fontSize',fontFamily:'sans-serif',fontStyle:'bold', textTransform: 'capitalize',fontWeight:'bold'}}
|
||||
>
|
||||
<GitHubIcon fontSize='large'/>
|
||||
GitHub
|
||||
</Button>
|
||||
</a>
|
||||
<Button
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{ color: 'white', display: 'block',fontSize:'h5.fontSize'}}
|
||||
>
|
||||
CREDITS
|
||||
</Button>
|
||||
|
||||
</Box>
|
||||
return (
|
||||
<NavbarStyle
|
||||
position="relative"
|
||||
sx={{ bgcolor: alpha("#000000", 0.5), m: "0px" }}
|
||||
>
|
||||
<Container maxWidth="xl">
|
||||
<Toolbar disableGutters="false">
|
||||
<Typography variant="h4" sx={{ fontWeight: "bold" }}>
|
||||
URL MINIFY
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
flexDirection: "row-reverse",
|
||||
display: { xs: "flex", md: "none" },
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
size="large"
|
||||
aria-label="account of current user"
|
||||
aria-controls="menu-appbar"
|
||||
aria-haspopup="true"
|
||||
onClick={handleOpenNavMenu}
|
||||
color="inherit"
|
||||
>
|
||||
<MenuIcon />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="menu-appbar"
|
||||
anchorEl={anchorElNav}
|
||||
anchorOrigin={{
|
||||
vertical: "bottom",
|
||||
horizontal: "left",
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "left",
|
||||
}}
|
||||
open={Boolean(anchorElNav)}
|
||||
onClose={handleCloseNavMenu}
|
||||
sx={{
|
||||
display: { xs: "block", md: "none" },
|
||||
}}
|
||||
>
|
||||
<MenuItem onClick={handleCloseNavMenu}>
|
||||
<a
|
||||
href="https://github.com/BRAVO68WEB/url-minify"
|
||||
target={"_blank"}
|
||||
>
|
||||
<Typography textAlign="center" sx={{ display: "flex" }}>
|
||||
<GitHubIcon fontSize="small" />
|
||||
GitHub
|
||||
</Typography>
|
||||
</a>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleCloseNavMenu}>
|
||||
<Typography textAlign="center" sx={{ display: "flex" }}>
|
||||
CRIDITS
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ flexGrow: 0 }}>
|
||||
<Tooltip title="Open settings">
|
||||
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
|
||||
<Avatar alt="Remy Sharp" src="/static/images/avatar/2.jpg" sx={{ width: 50, height: 50 }} />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Menu
|
||||
sx={{ mt: '45px' }}
|
||||
id="menu-appbar"
|
||||
anchorEl={anchorElUser}
|
||||
anchorOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
open={Boolean(anchorElUser)}
|
||||
onClose={handleCloseUserMenu}
|
||||
>
|
||||
{settings.map((setting) => (
|
||||
<MenuItem key={setting} onClick={handleCloseUserMenu}>
|
||||
<Typography textAlign="center">{setting}</Typography>
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</Box>
|
||||
</Toolbar>
|
||||
</Container>
|
||||
</NavbarStyle>
|
||||
);
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
flexDirection: "row-reverse",
|
||||
gap: "10px",
|
||||
px: "20px",
|
||||
display: { xs: "none", md: "flex" },
|
||||
}}
|
||||
>
|
||||
<a
|
||||
href="https://github.com/BRAVO68WEB/url-minify"
|
||||
target={"_blank"}
|
||||
>
|
||||
<Button
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{
|
||||
color: "white",
|
||||
display: "flex",
|
||||
gap: "10px",
|
||||
fontSize: "h5.fontSize",
|
||||
fontFamily: "sans-serif",
|
||||
fontStyle: "bold",
|
||||
textTransform: "capitalize",
|
||||
fontWeight: "bold",
|
||||
}}
|
||||
>
|
||||
<GitHubIcon fontSize="large" />
|
||||
GitHub
|
||||
</Button>
|
||||
</a>
|
||||
<Button
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{ color: "white", display: "block", fontSize: "h5.fontSize" }}
|
||||
>
|
||||
CREDITS
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ flexGrow: 0 }}>
|
||||
<Tooltip title="Open settings">
|
||||
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
|
||||
<Avatar
|
||||
alt="Remy Sharp"
|
||||
src="/static/images/avatar/2.jpg"
|
||||
sx={{ width: 50, height: 50 }}
|
||||
/>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Menu
|
||||
sx={{ mt: "45px" }}
|
||||
id="menu-appbar"
|
||||
anchorEl={anchorElUser}
|
||||
anchorOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
open={Boolean(anchorElUser)}
|
||||
onClose={handleCloseUserMenu}
|
||||
>
|
||||
{settings.map((setting) => (
|
||||
<MenuItem key={setting} onClick={handleCloseUserMenu}>
|
||||
<Typography textAlign="center">{setting}</Typography>
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</Box>
|
||||
</Toolbar>
|
||||
</Container>
|
||||
</NavbarStyle>
|
||||
);
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
|
|
|
@ -1,67 +1,105 @@
|
|||
import React from 'react';
|
||||
import React from "react";
|
||||
import RegStyle from "./Reg.style";
|
||||
import Image from 'next/image'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faUser, faEnvelope, faLock, faClose } from '@fortawesome/free-solid-svg-icons'
|
||||
import { useState } from 'react';
|
||||
import { Link } from '@mui/material';
|
||||
import Image from "next/image";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import {
|
||||
faUser,
|
||||
faEnvelope,
|
||||
faLock,
|
||||
faClose,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { useState } from "react";
|
||||
import { Link } from "@mui/material";
|
||||
|
||||
function Reg(){
|
||||
function Reg() {
|
||||
const [userData, setUserData] = useState({
|
||||
username: "",
|
||||
email: "",
|
||||
password: "",
|
||||
repassword: "",
|
||||
});
|
||||
|
||||
const [userData, setUserData] = useState({
|
||||
username: "",
|
||||
email: "",
|
||||
password:"",
|
||||
repassword:""
|
||||
})
|
||||
const handleInput = (event) => {
|
||||
const name = event.target.name;
|
||||
const value = event.target.value;
|
||||
setUserData({ ...userData, [name]: value });
|
||||
};
|
||||
|
||||
const handleInput = (event) => {
|
||||
const name = event.target.name;
|
||||
const value = event.target.value;
|
||||
setUserData({ ...userData, [name]: value})
|
||||
}
|
||||
return (
|
||||
<RegStyle>
|
||||
<form className="form-wrapper">
|
||||
<div className="reg-wide-container">
|
||||
<FontAwesomeIcon icon={faClose} />
|
||||
</div>
|
||||
|
||||
return(
|
||||
<RegStyle>
|
||||
<form className='form-wrapper'>
|
||||
<div className='reg-wide-container'>
|
||||
<FontAwesomeIcon icon={faClose}/>
|
||||
</div>
|
||||
|
||||
<p className='reg-title'>Sign Up</p>
|
||||
<div className='reg-field'>
|
||||
<div className='reg-label'>
|
||||
<FontAwesomeIcon icon={faUser}/>
|
||||
</div>
|
||||
<input className='reg-input' name='username' autoComplete='off' type="text" value={userData.username} onChange={handleInput} placeholder='Full Name' />
|
||||
</div>
|
||||
<div className='reg-field'>
|
||||
<div className='reg-label'>
|
||||
<FontAwesomeIcon icon={faEnvelope}/>
|
||||
</div>
|
||||
<input className='reg-input' name='email' autoComplete='off' onChange={handleInput} type="text" value={userData.email} placeholder='Email Address'/>
|
||||
</div>
|
||||
<div className='reg-field'>
|
||||
<div className='reg-label'>
|
||||
<FontAwesomeIcon icon={faLock}/>
|
||||
</div>
|
||||
<input className='reg-input' name='password' autoComplete='off' onChange={handleInput} type="password" value={userData.password} placeholder='Password'/>
|
||||
</div>
|
||||
<div className='reg-field'>
|
||||
<div className='reg-label'>
|
||||
<FontAwesomeIcon icon={faLock}/>
|
||||
</div>
|
||||
<input className='reg-input' name='repassword' autoComplete='off' onChange={handleInput} type="password" value={userData.repassword} placeholder='Confirm Password' />
|
||||
</div>
|
||||
<button type='submit' className='submit-button'>Submit</button>
|
||||
<p className="foot-text">Already registered? Login
|
||||
<Link href="/" exact className='foot-text underline'>here</Link>
|
||||
</p>
|
||||
|
||||
|
||||
</form>
|
||||
</RegStyle>
|
||||
|
||||
)
|
||||
<p className="reg-title">Sign Up</p>
|
||||
<div className="reg-field">
|
||||
<div className="reg-label">
|
||||
<FontAwesomeIcon icon={faUser} />
|
||||
</div>
|
||||
<input
|
||||
className="reg-input"
|
||||
name="username"
|
||||
autoComplete="off"
|
||||
type="text"
|
||||
value={userData.username}
|
||||
onChange={handleInput}
|
||||
placeholder="Full Name"
|
||||
/>
|
||||
</div>
|
||||
<div className="reg-field">
|
||||
<div className="reg-label">
|
||||
<FontAwesomeIcon icon={faEnvelope} />
|
||||
</div>
|
||||
<input
|
||||
className="reg-input"
|
||||
name="email"
|
||||
autoComplete="off"
|
||||
onChange={handleInput}
|
||||
type="text"
|
||||
value={userData.email}
|
||||
placeholder="Email Address"
|
||||
/>
|
||||
</div>
|
||||
<div className="reg-field">
|
||||
<div className="reg-label">
|
||||
<FontAwesomeIcon icon={faLock} />
|
||||
</div>
|
||||
<input
|
||||
className="reg-input"
|
||||
name="password"
|
||||
autoComplete="off"
|
||||
onChange={handleInput}
|
||||
type="password"
|
||||
value={userData.password}
|
||||
placeholder="Password"
|
||||
/>
|
||||
</div>
|
||||
<div className="reg-field">
|
||||
<div className="reg-label">
|
||||
<FontAwesomeIcon icon={faLock} />
|
||||
</div>
|
||||
<input
|
||||
className="reg-input"
|
||||
name="repassword"
|
||||
autoComplete="off"
|
||||
onChange={handleInput}
|
||||
type="password"
|
||||
value={userData.repassword}
|
||||
placeholder="Confirm Password"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" className="submit-button">
|
||||
Submit
|
||||
</button>
|
||||
<p className="foot-text">
|
||||
Already registered? Login
|
||||
<Link href="/" exact className="foot-text underline">
|
||||
here
|
||||
</Link>
|
||||
</p>
|
||||
</form>
|
||||
</RegStyle>
|
||||
);
|
||||
}
|
||||
export default Reg;
|
||||
export default Reg;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import styled from "styled-components"
|
||||
import styled from "styled-components";
|
||||
|
||||
export default styled.section`
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
flex-direction:column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
`
|
||||
`;
|
||||
|
|
|
@ -1,106 +1,106 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;500;700&display=swap');
|
||||
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;500;700&display=swap");
|
||||
|
||||
.reg-label{
|
||||
font-size: 24px;
|
||||
width: 30px;
|
||||
color: #9134bd;
|
||||
position: relative;
|
||||
.reg-label {
|
||||
font-size: 24px;
|
||||
width: 30px;
|
||||
color: #9134bd;
|
||||
position: relative;
|
||||
}
|
||||
.reg-title{
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 36px;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
color:#9134bd;
|
||||
.reg-title {
|
||||
font-family: "Montserrat", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 36px;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
color: #9134bd;
|
||||
}
|
||||
.reg-wide-container{
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
color: #9134bd;
|
||||
font-size: 24px;
|
||||
.reg-wide-container {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
color: #9134bd;
|
||||
font-size: 24px;
|
||||
}
|
||||
.reg-input{
|
||||
margin-left: 10px;
|
||||
height: 35px;
|
||||
width: 340px;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
border-radius: 20px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
justify-content: flex-end;
|
||||
color: #9134bd;
|
||||
.reg-input {
|
||||
margin-left: 10px;
|
||||
height: 35px;
|
||||
width: 340px;
|
||||
font-family: "Montserrat", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
border-radius: 20px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
justify-content: flex-end;
|
||||
color: #9134bd;
|
||||
}
|
||||
.reg-input:active, .reg-input:focus{
|
||||
outline: none;
|
||||
.reg-input:active,
|
||||
.reg-input:focus {
|
||||
outline: none;
|
||||
}
|
||||
.reg-input::placeholder{
|
||||
color: #6babc7;
|
||||
.reg-input::placeholder {
|
||||
color: #6babc7;
|
||||
}
|
||||
.reg-field{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
.reg-field {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.form-wrapper{
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
padding: 20px 30px 40px 30px;
|
||||
border-radius: 20px;
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
backdrop-filter: blur(6px);
|
||||
border-style: solid;
|
||||
border-color: #f1faff;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
margin-top: 0;
|
||||
.form-wrapper {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
padding: 20px 30px 40px 30px;
|
||||
border-radius: 20px;
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
backdrop-filter: blur(6px);
|
||||
border-style: solid;
|
||||
border-color: #f1faff;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.submit-button{
|
||||
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
margin-top: 20px ;
|
||||
background-image: linear-gradient(135deg ,#cc5fff, #7E3EE4, #0087ca, #2db9ff);
|
||||
background-size: 200%;
|
||||
background-position: left;
|
||||
color: white;
|
||||
transition: 0.5s;
|
||||
.submit-button {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
font-family: "Montserrat", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
margin-top: 20px;
|
||||
background-image: linear-gradient(135deg, #cc5fff, #7e3ee4, #0087ca, #2db9ff);
|
||||
background-size: 200%;
|
||||
background-position: left;
|
||||
color: white;
|
||||
transition: 0.5s;
|
||||
}
|
||||
.submit-button:hover{
|
||||
background-position: right;
|
||||
.submit-button:hover {
|
||||
background-position: right;
|
||||
}
|
||||
.submit-button:active{
|
||||
transform: scale(0.95);
|
||||
transition: 0.1s
|
||||
.submit-button:active {
|
||||
transform: scale(0.95);
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
.icon{
|
||||
fill: black;
|
||||
.icon {
|
||||
fill: black;
|
||||
}
|
||||
|
||||
.foot-text{
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
margin-top: 50px;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
.foot-text {
|
||||
font-family: "Montserrat", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
margin-top: 50px;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.underline{
|
||||
text-decoration: underline;
|
||||
color: #9134bd;
|
||||
.underline {
|
||||
text-decoration: underline;
|
||||
color: #9134bd;
|
||||
}
|
||||
.underline:hover{
|
||||
color: #008ed4;
|
||||
transition: 0.5s;
|
||||
.underline:hover {
|
||||
color: #008ed4;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@ import axios from "axios";
|
|||
var API_URL = process.env.NEXT_PUBLIC_API_URL;
|
||||
|
||||
export default axios.create({
|
||||
baseURL: API_URL,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
baseURL: API_URL,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
});
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
}
|
||||
reactStrictMode: true,
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,50 +1,50 @@
|
|||
{
|
||||
"name": "url-minify",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"prettier": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.7.1",
|
||||
"@emotion/styled": "^11.6.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.0.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.0.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.0.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.17",
|
||||
"@mui/icons-material": "^5.3.1",
|
||||
"@mui/material": "^5.4.0",
|
||||
"@mui/styled-engine-sc": "^5.3.0",
|
||||
"axios": "^0.25.0",
|
||||
"nanoid": "^3.2.0",
|
||||
"next": "12.0.9",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"styled-components": "^5.3.3"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/bravo68web/url-minify.git"
|
||||
},
|
||||
"keywords": [
|
||||
"url-minify",
|
||||
"short-link",
|
||||
"generator",
|
||||
"nextjs",
|
||||
"frontend",
|
||||
"api",
|
||||
"rest"
|
||||
],
|
||||
"author": "BRAVO68WEB",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bravo68web/url-minify/issues"
|
||||
},
|
||||
"homepage": "https://github.com/bravo68web/url-minify#readme",
|
||||
"devDependencies": {
|
||||
"prettier": "2.5.1"
|
||||
}
|
||||
"name": "url-minify",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"prettier": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.7.1",
|
||||
"@emotion/styled": "^11.6.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.0.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.0.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.0.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.17",
|
||||
"@mui/icons-material": "^5.3.1",
|
||||
"@mui/material": "^5.4.0",
|
||||
"@mui/styled-engine-sc": "^5.3.0",
|
||||
"axios": "^0.25.0",
|
||||
"nanoid": "^3.2.0",
|
||||
"next": "12.0.9",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"styled-components": "^5.3.3"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/bravo68web/url-minify.git"
|
||||
},
|
||||
"keywords": [
|
||||
"url-minify",
|
||||
"short-link",
|
||||
"generator",
|
||||
"nextjs",
|
||||
"frontend",
|
||||
"api",
|
||||
"rest"
|
||||
],
|
||||
"author": "BRAVO68WEB",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bravo68web/url-minify/issues"
|
||||
},
|
||||
"homepage": "https://github.com/bravo68web/url-minify#readme",
|
||||
"devDependencies": {
|
||||
"prettier": "2.5.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
import React from "react";
|
||||
|
||||
export default function NotFound() {
|
||||
return <div>NotFound</div>;
|
||||
}
|
|
@ -1,21 +1,105 @@
|
|||
import { useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import HomeSection from "components/HomeSection/homeSection"
|
||||
import { useEffect, useState } from "react";
|
||||
import Head from "next/head";
|
||||
import HomeSection from "components/HomeSection/homeSection";
|
||||
import NavBar from "components/NavBar";
|
||||
import Features from 'components/Features'
|
||||
import Features from "components/Features";
|
||||
import { useRouter } from "next/router";
|
||||
var axios = require("axios");
|
||||
|
||||
function Redirector(props) {
|
||||
const router = useRouter();
|
||||
// const { id } = router.query;
|
||||
// useEffect(() => {
|
||||
// if (id) {
|
||||
// var config = {
|
||||
// method: 'get',
|
||||
// url: `http://localhost:5000/minify/alias/${id}`
|
||||
// };
|
||||
// axios(config)
|
||||
// .then(function (response) {
|
||||
// if(!response.data.success){
|
||||
// router.replace('/404')
|
||||
// }
|
||||
// else{
|
||||
// router.replace(response.data.data.originalUrl)
|
||||
// }
|
||||
// })
|
||||
// .catch(function (error) {
|
||||
// console.log(error);
|
||||
// });
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className={""}>
|
||||
<Head>
|
||||
<title>URL MiniFy</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
// }
|
||||
// },[id])
|
||||
useEffect(() => {
|
||||
if (!props?.resData.success) {
|
||||
// router.push('/404')
|
||||
} else {
|
||||
// router.replace(`${props.resData.data.originalUrl}`)
|
||||
}
|
||||
}, []);
|
||||
return (
|
||||
<div className={""}>
|
||||
<Head>
|
||||
<title>URL MiniFy</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className={"main-bg"}>
|
||||
Not Found
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
<main className={"main-bg"}>Not Found</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Redirector.getInitialProps = async (context) => {
|
||||
const { id } = context.query;
|
||||
let resData = {};
|
||||
if (id) {
|
||||
var config = {
|
||||
method: "get",
|
||||
url: `http://localhost:5000/minify/alias/${id}`,
|
||||
};
|
||||
await axios(config)
|
||||
.then(function (response) {
|
||||
resData = response.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
resData = error;
|
||||
});
|
||||
}
|
||||
|
||||
if (context?.res) {
|
||||
const go = resData?.data?.originalUrl ? resData?.data?.originalUrl : "/404";
|
||||
console.log(go);
|
||||
context?.res.writeHead(302, {
|
||||
Location: go,
|
||||
});
|
||||
context?.res.end();
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
// export async function getServerSideProps(context){
|
||||
// const { id } = context.query;
|
||||
// let resData = {};
|
||||
// if (id) {
|
||||
// var config = {
|
||||
// method: 'get',
|
||||
// url: `http://localhost:5000/minify/alias/${id}`
|
||||
// };
|
||||
// await axios(config)
|
||||
// .then(function (response) {
|
||||
// resData = response.data;
|
||||
// })
|
||||
// .catch(function (error) {
|
||||
// resData = error;
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
// return {
|
||||
// props: {
|
||||
// resData : resData
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
export default Redirector;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import '../styles/globals.css'
|
||||
import '../styles/logostyles.css'
|
||||
import '../components/Reg/styles.css'
|
||||
import "../styles/globals.css";
|
||||
import "../styles/logostyles.css";
|
||||
import "../components/Reg/styles.css";
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return <Component {...pageProps} />
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
export default MyApp;
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
import Document from 'next/document'
|
||||
import { ServerStyleSheet } from 'styled-components'
|
||||
import Document from "next/document";
|
||||
import { ServerStyleSheet } from "styled-components";
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
const sheet = new ServerStyleSheet()
|
||||
const originalRenderPage = ctx.renderPage
|
||||
static async getInitialProps(ctx) {
|
||||
const sheet = new ServerStyleSheet();
|
||||
const originalRenderPage = ctx.renderPage;
|
||||
|
||||
try {
|
||||
ctx.renderPage = () =>
|
||||
originalRenderPage({
|
||||
enhanceApp: (App) => (props) =>
|
||||
sheet.collectStyles(<App {...props} />),
|
||||
})
|
||||
try {
|
||||
ctx.renderPage = () =>
|
||||
originalRenderPage({
|
||||
enhanceApp: (App) => (props) =>
|
||||
sheet.collectStyles(<App {...props} />),
|
||||
});
|
||||
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
{sheet.getStyleElement()}
|
||||
</>
|
||||
),
|
||||
}
|
||||
} finally {
|
||||
sheet.seal()
|
||||
}
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
{sheet.getStyleElement()}
|
||||
</>
|
||||
),
|
||||
};
|
||||
} finally {
|
||||
sheet.seal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
|
||||
export default function handler(req, res) {
|
||||
res.status(200).json({ name: 'John Doe' })
|
||||
res.status(200).json({ name: "John Doe" });
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import Head from "next/head";
|
|||
import NavBar from "../../components/NavBar";
|
||||
import Dashboard from "components/Dashboard/Dashboard"
|
||||
|
||||
function Index(props) {
|
||||
function Index() {
|
||||
return (
|
||||
<div className={""}>
|
||||
<Head>
|
||||
|
|
|
@ -1,25 +1,29 @@
|
|||
import { useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import HomeSection from "components/HomeSection/homeSection"
|
||||
import React, { useState } from "react";
|
||||
import Head from "next/head";
|
||||
import HomeSection from "components/HomeSection/homeSection";
|
||||
import NavBar from "components/NavBar";
|
||||
import Features from 'components/Features'
|
||||
|
||||
import Features from "components/Features";
|
||||
|
||||
export default function Home() {
|
||||
const [shortUrl, setShortUrl] = useState(null)
|
||||
const [longUrl, setLongUrl] = useState('')
|
||||
return (
|
||||
<div className={""}>
|
||||
<Head>
|
||||
<title>URL MiniFy</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
const [shortUrl, setShortUrl] = useState(null);
|
||||
const [longUrl, setLongUrl] = useState("");
|
||||
return (
|
||||
<div className={""}>
|
||||
<Head>
|
||||
<title>URL MiniFy</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className={"main-bg"}>
|
||||
<NavBar />
|
||||
<HomeSection shortUrl={shortUrl} setShortUrl={setShortUrl} longUrl={longUrl} setLongUrl={setLongUrl}/>
|
||||
<Features/>
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
<main className={"main-bg"}>
|
||||
<NavBar />
|
||||
<HomeSection
|
||||
shortUrl={shortUrl}
|
||||
setShortUrl={setShortUrl}
|
||||
longUrl={longUrl}
|
||||
setLongUrl={setLongUrl}
|
||||
/>
|
||||
<Features />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
import { useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import { useState } from "react";
|
||||
import Head from "next/head";
|
||||
import NavBar from "components/NavBar";
|
||||
import Features from 'components/Features'
|
||||
import Reg from 'components/Reg/Reg'
|
||||
import Features from "components/Features";
|
||||
import Reg from "components/Reg/Reg";
|
||||
|
||||
export default function signup(){
|
||||
return (
|
||||
<div className='flex-column'>
|
||||
<NavBar/>
|
||||
<Reg/>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
export default function signup() {
|
||||
return (
|
||||
<div className="flex-column">
|
||||
<NavBar />
|
||||
<Reg />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
arrowParens: 'always',
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
semi: false,
|
||||
}
|
|
@ -1,116 +1,116 @@
|
|||
.container {
|
||||
padding: 0 2rem;
|
||||
padding: 0 2rem;
|
||||
}
|
||||
|
||||
.main {
|
||||
min-height: 100vh;
|
||||
padding: 4rem 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
padding: 4rem 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
padding: 2rem 0;
|
||||
border-top: 1px solid #eaeaea;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
padding: 2rem 0;
|
||||
border-top: 1px solid #eaeaea;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.title a {
|
||||
color: #0070f3;
|
||||
text-decoration: none;
|
||||
color: #0070f3;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.title a:hover,
|
||||
.title a:focus,
|
||||
.title a:active {
|
||||
text-decoration: underline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
line-height: 1.15;
|
||||
font-size: 4rem;
|
||||
margin: 0;
|
||||
line-height: 1.15;
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.title,
|
||||
.description {
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin: 4rem 0;
|
||||
line-height: 1.5;
|
||||
font-size: 1.5rem;
|
||||
margin: 4rem 0;
|
||||
line-height: 1.5;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.code {
|
||||
background: #fafafa;
|
||||
border-radius: 5px;
|
||||
padding: 0.75rem;
|
||||
font-size: 1.1rem;
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
background: #fafafa;
|
||||
border-radius: 5px;
|
||||
padding: 0.75rem;
|
||||
font-size: 1.1rem;
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
max-width: 800px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 1rem;
|
||||
padding: 1.5rem;
|
||||
text-align: left;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 10px;
|
||||
transition: color 0.15s ease, border-color 0.15s ease;
|
||||
max-width: 300px;
|
||||
margin: 1rem;
|
||||
padding: 1.5rem;
|
||||
text-align: left;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 10px;
|
||||
transition: color 0.15s ease, border-color 0.15s ease;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.card:hover,
|
||||
.card:focus,
|
||||
.card:active {
|
||||
color: #0070f3;
|
||||
border-color: #0070f3;
|
||||
color: #0070f3;
|
||||
border-color: #0070f3;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
margin: 0 0 1rem 0;
|
||||
font-size: 1.5rem;
|
||||
margin: 0 0 1rem 0;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.card p {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 1em;
|
||||
margin-left: 0.5rem;
|
||||
height: 1em;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.grid {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
.grid {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,33 @@
|
|||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width:100vw;
|
||||
overflow-x:hidden;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding:0;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
section{
|
||||
width:100vw;
|
||||
min-height:100vh;
|
||||
section {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.flex-column{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url("./../assets/bg/main-bg.png");
|
||||
.flex-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url("./../assets/bg/main-bg.png");
|
||||
}
|
||||
.main-bg{
|
||||
background-image: url("./../assets/bg/main-bg.png");
|
||||
.main-bg {
|
||||
background-image: url("./../assets/bg/main-bg.png");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
/* This StyleSheet was prepared for the logo in the NavBar.
|
||||
Please put any other style definitions inside globals.css or create a new stylesheet under styles folder */
|
||||
|
||||
.logo{
|
||||
width: 3rem;
|
||||
position: relative;
|
||||
top: 0.2rem;
|
||||
.logo {
|
||||
width: 3rem;
|
||||
position: relative;
|
||||
top: 0.2rem;
|
||||
}
|
||||
|
||||
|
||||
.logo-text{
|
||||
font-family: sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
margin-right: 3.5rem;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -0.7rem;
|
||||
.logo-text {
|
||||
font-family: sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
margin-right: 3.5rem;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -0.7rem;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,40 +260,40 @@
|
|||
|
||||
"@fortawesome/fontawesome-common-types@^0.3.0":
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.3.0.tgz#949995a05c0d8801be7e0a594f775f1dbaa0d893"
|
||||
resolved "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.3.0.tgz"
|
||||
integrity sha512-CA3MAZBTxVsF6SkfkHXDerkhcQs0QPofy43eFdbWJJkZiq3SfiaH1msOkac59rQaqto5EqWnASboY1dBuKen5w==
|
||||
|
||||
"@fortawesome/fontawesome-svg-core@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.3.0.tgz#343fac91fa87daa630d26420bfedfba560f85885"
|
||||
resolved "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.3.0.tgz"
|
||||
integrity sha512-UIL6crBWhjTNQcONt96ExjUnKt1D68foe3xjEensLDclqQ6YagwCRYVQdrp/hW0ALRp/5Fv/VKw+MqTUWYYvPg==
|
||||
dependencies:
|
||||
"@fortawesome/fontawesome-common-types" "^0.3.0"
|
||||
|
||||
"@fortawesome/free-brands-svg-icons@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.0.0.tgz#c69830ec2fad38c95945867f4e6927bf33cce6f8"
|
||||
resolved "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.0.0.tgz"
|
||||
integrity sha512-BIhsy2YeGuk8+KQwpqmyayQDWo1lvGMHsMIE+z5ApPRgV7T+zGhmNzYVoBT4IrJMC6ep5WpGrxoHX+IvNxHnkw==
|
||||
dependencies:
|
||||
"@fortawesome/fontawesome-common-types" "^0.3.0"
|
||||
|
||||
"@fortawesome/free-regular-svg-icons@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.0.0.tgz#f3cb91dac643472fe8138024b93fbfbdf05675cc"
|
||||
resolved "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.0.0.tgz"
|
||||
integrity sha512-lYK6oyQL8HwZUAVWGqF7TGuwQBVfphNBVTdvPSD3h4gmQfGazm/xcwg3kmtcRycu3y6QspOC7hPXSoJbVqSYCw==
|
||||
dependencies:
|
||||
"@fortawesome/fontawesome-common-types" "^0.3.0"
|
||||
|
||||
"@fortawesome/free-solid-svg-icons@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.0.0.tgz#bed4a501b631c6cfa35c09830f7cb63ffca1589d"
|
||||
resolved "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.0.0.tgz"
|
||||
integrity sha512-o4FZ1XbndcgeWNb8Wh0y+Hgf73CjmyOQowUSaqQCtgIIdS+XliSBSOwCl330wER+I6CGYE96hT27bHBPmzX2Gg==
|
||||
dependencies:
|
||||
"@fortawesome/fontawesome-common-types" "^0.3.0"
|
||||
|
||||
"@fortawesome/react-fontawesome@^0.1.17":
|
||||
version "0.1.17"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.17.tgz#06fc06cb1a721e38e5b50b4a1cb851e9b9c77d7a"
|
||||
resolved "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.17.tgz"
|
||||
integrity sha512-dX43Z5IvMaW7fwzU8farosYjKNGfRb2HB/DgjVBHeJZ/NSnuuaujPPx0YOdcAq+n3mqn70tyCde2HM1mqbhiuw==
|
||||
dependencies:
|
||||
prop-types "^15.8.1"
|
||||
|
@ -501,6 +501,13 @@ ansi-styles@^3.2.1:
|
|||
dependencies:
|
||||
color-convert "^1.9.0"
|
||||
|
||||
axios@^0.25.0:
|
||||
version "0.25.0"
|
||||
resolved "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz"
|
||||
integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==
|
||||
dependencies:
|
||||
follow-redirects "^1.14.7"
|
||||
|
||||
babel-plugin-macros@^2.6.1:
|
||||
version "2.8.0"
|
||||
resolved "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz"
|
||||
|
@ -640,6 +647,11 @@ find-root@^1.1.0:
|
|||
resolved "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz"
|
||||
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
|
||||
|
||||
follow-redirects@^1.14.7:
|
||||
version "1.14.8"
|
||||
resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz"
|
||||
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
|
||||
|
||||
function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
|
||||
|
@ -728,7 +740,7 @@ ms@2.1.2:
|
|||
|
||||
nanoid@^3.1.30, nanoid@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c"
|
||||
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz"
|
||||
integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==
|
||||
|
||||
next@12.0.9:
|
||||
|
|
Loading…
Reference in New Issue