Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gupta-Anubhav12 committed Feb 12, 2023
1 parent 644ba6d commit 39588fc
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions components/Input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
<<<<<<< HEAD
import React, { useState, SetStateAction, useEffect } from 'react'
import SuggestionBox from './SuggestionBox'
import { GenerateAnswer } from '@/apiFunctions/generate';
import { usePlausible } from 'next-plausible'
import SupaAuthModal from '@/components/auth/SupaAuthModal'
import { useCookies } from 'react-cookie';

=======
import React, { useState, SetStateAction, useEffect } from "react";
import SuggestionBox from "./SuggestionBox";
import { GenerateAnswer } from "@/apiFunctions/generate";
import { usePlausible } from "next-plausible";
>>>>>>> cd4b66e5d229f253ad255b14aeef3c775ac263be

interface InputProps {
showSuggestions: boolean;
Expand Down Expand Up @@ -81,14 +74,7 @@ const Input = ({
setChat(chatArray);
setShowSuggestions(false);
setInput("");
<<<<<<< HEAD

}
catch (err: any) {

=======
} catch (err: Error | any) {
>>>>>>> cd4b66e5d229f253ad255b14aeef3c775ac263be
if (err?.response?.status === 429) {
let history = chat;
history?.push({
Expand All @@ -99,27 +85,13 @@ const Input = ({
setChat(history);
setInput("");
}
<<<<<<< HEAD
else if (err?.response?.status == 401) {
setOpen(true);
}
}
finally {
setLoading(false)
plausible('AskKrishna');
// sent event to Google Analytics 4 (gtag.js)
(window as any).gtag('event', 'ask_krishna', {
'event_category': 'Generate',
'event_label': input
=======
} finally {
setLoading(false);
plausible("AskKrishna");

(window as any).gtag("event", "ask_krishna", {
event_category: "Generate",
event_label: input,
>>>>>>> cd4b66e5d229f253ad255b14aeef3c775ac263be
});
}
};
Expand Down Expand Up @@ -187,15 +159,9 @@ const Input = ({
)}
</button>
</div>
<<<<<<< HEAD
<SupaAuthModal open={open} setOpen={setOpen} />
</>
</div>
)
}
=======
</div>
);
};
>>>>>>> cd4b66e5d229f253ad255b14aeef3c775ac263be

export default Input;

0 comments on commit 39588fc

Please sign in to comment.