Removed console.logs

This commit is contained in:
2024-10-18 19:06:47 -03:00
parent f73dc89c82
commit 359fda5fd5
3 changed files with 3 additions and 12 deletions

View File

@@ -13,12 +13,6 @@ export const Charts = ({
}) => {
const options = ["Top albums", "Artist popularity"];
const [selectedOption, setSelectedOption] = useState(options[0]);
const a = "";
console.log({
longTermArtistData,
longTermTracksData,
longTermTracksByAlbum,
});
const topAlbums = Object.values(longTermTracksByAlbum).sort(
(a, b) => b.tracks.length - a.tracks.length,
);

View File

@@ -1,4 +1,4 @@
import { NextApiRequest, NextApiResponse } from "next";
import { type NextApiRequest, type NextApiResponse } from "next";
import SpotifyWebApi from "spotify-web-api-node";
import { redirect } from "next/navigation";
@@ -8,7 +8,7 @@ const spotifyApi = new SpotifyWebApi({
redirectUri: process.env.SPOTIFY_REDIRECT_URI,
});
const state = process.env.SPOTIFY_STATE as string;
const state = process.env.SPOTIFY_STATE!;
export async function GET(req: NextApiRequest, res: NextApiResponse) {
const scopes = [
@@ -19,6 +19,5 @@ export async function GET(req: NextApiRequest, res: NextApiResponse) {
];
const authorizeURL = spotifyApi.createAuthorizeURL(scopes, state);
console.log(authorizeURL);
redirect(authorizeURL);
}

View File

@@ -1,5 +1,5 @@
import * as cloudinary from "cloudinary";
import { Entry } from "../api/routers/entry";
import { type Entry } from "../api/routers/entry";
export const generateEntryUniqueKey = (entry: Entry): string => {
return `${entry.type}:${entry.name.trim().toLowerCase().replace(/\s/g, "-")}:${entry.number || 1}`;
@@ -16,7 +16,6 @@ export const uploadImage = async (
try {
const result = await cloudinary.v2.uploader.upload(imagePath, options);
console.log(result);
return result.public_id;
} catch (error) {
console.error(error);
@@ -37,7 +36,6 @@ export const makeImageSpooky = (publicId: string, number?: number) => {
try {
const result = cloudinary.v2.image(publicId, { ...options });
console.log(result);
return result;
} catch (error) {
console.error(error);