mirror of
https://github.com/arkorty/Reduce.git
synced 2026-03-18 00:47:10 +00:00
Chore: clean-up and refactor
This commit is contained in:
@@ -9,7 +9,7 @@ export async function GET(request, { params }) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(
|
const response = await axios.get(
|
||||||
`${process.env.NEXT_PUBLIC_BACKEND_URL}/reduce/${id}`,
|
`${process.env.NEXT_PUBLIC_BACKEND_URL}/reduce/${id}`
|
||||||
);
|
);
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
return NextResponse.redirect(response.data.long_url);
|
return NextResponse.redirect(response.data.long_url);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const inter = Inter({ subsets: ["latin"] });
|
|||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: "Reduce",
|
title: "Reduce",
|
||||||
description: "A simple URL shortener application",
|
description: "A simple URL shortener application.",
|
||||||
icons: {
|
icons: {
|
||||||
icon: "/favicon.ico",
|
icon: "/favicon.ico",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function Home() {
|
|||||||
{
|
{
|
||||||
long_url: longUrl,
|
long_url: longUrl,
|
||||||
base_url: baseURL,
|
base_url: baseURL,
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
setShortUrl(response.data.short_url);
|
setShortUrl(response.data.short_url);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/react": "^18.3.3",
|
||||||
"axios": "^1.7.3",
|
"axios": "^1.7.3",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
export const content = [
|
||||||
content: [
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
];
|
||||||
],
|
export const theme = {
|
||||||
theme: {
|
extend: {
|
||||||
extend: {
|
backgroundImage: {
|
||||||
backgroundImage: {
|
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
||||||
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
"gradient-conic":
|
||||||
"gradient-conic":
|
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
||||||
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [],
|
|
||||||
};
|
};
|
||||||
|
export const plugins = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user