removed warnings

This commit is contained in:
Chirag Bhalotia 2023-06-25 01:38:52 +05:30
parent f6f612e899
commit d0ff7da7e8
No known key found for this signature in database
GPG Key ID: F7F1F1FBFFD40427
5 changed files with 4 additions and 8 deletions

View File

@ -11,7 +11,7 @@ export class Notes {
const data = res.data.data as INote[]; const data = res.data.data as INote[];
return data; return data;
} }
async getSingleNote(id: string, passkey: string = '') { async getSingleNote(id: string, passkey = '') {
const res = await this.axios.get(`/gist/${id}`, { const res = await this.axios.get(`/gist/${id}`, {
params: passkey ? { passkey } : {}, params: passkey ? { passkey } : {},
}); });

View File

@ -61,7 +61,7 @@ function Page() {
const [apiKey, setApiKey] = useState(''); const [apiKey, setApiKey] = useState('');
useEffect(() => { useEffect(() => {
setApiKey(Cookies.get('apiKey') ?? ''); setApiKey(Cookies.get('apiKey') ?? '');
}); },[]);
async function onDownloadFile(url: string, filename: string) { async function onDownloadFile(url: string, filename: string) {
try { try {

View File

@ -2,7 +2,6 @@
import React, { ChangeEventHandler, useEffect, useState } from 'react'; import React, { ChangeEventHandler, useEffect, useState } from 'react';
import Button from '@/components/ui/Button'; import Button from '@/components/ui/Button';
import Input from '@/components/ui/Input';
import TagInput from '@/components/TagInput'; import TagInput from '@/components/TagInput';
import api from '@/api'; import api from '@/api';
import { toast } from 'react-hot-toast'; import { toast } from 'react-hot-toast';

View File

@ -1,8 +1,6 @@
import Button from '@/components/ui/Button'; import Button from '@/components/ui/Button';
import Cookies from 'js-cookie'; import { ArrowUpRight, Copy, Trash2 } from 'lucide-react';
import { ArrowUpRight, Copy, Edit, Trash2 } from 'lucide-react';
import Link from 'next/link'; import Link from 'next/link';
import { useEffect, useState } from 'react';
interface NotesLitsProps { interface NotesLitsProps {
data: INote[]; data: INote[];

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import React, { useEffect, useState } from 'react'; import React, { useState } from 'react';
import Button from '@/components/ui/Button'; import Button from '@/components/ui/Button';
import { Trash, Edit2, ArrowUpRight, X } from 'lucide-react'; import { Trash, Edit2, ArrowUpRight, X } from 'lucide-react';
import URLControls from './URLControls'; import URLControls from './URLControls';
@ -9,7 +9,6 @@ import Input from '@/components/ui/Input';
import api from '@/api'; import api from '@/api';
import { useRouter } from 'next/navigation'; import { useRouter } from 'next/navigation';
import { toast } from 'react-hot-toast'; import { toast } from 'react-hot-toast';
import Cookies from 'js-cookie';
interface ShortenUrlListProps { interface ShortenUrlListProps {
data: IUrl[]; data: IUrl[];