Skip to content

Commit

Permalink
Fix sourcery issues
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnayak committed Sep 18, 2024
1 parent 5451876 commit 7cef6b6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
15 changes: 7 additions & 8 deletions ui/src/app/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export default function Page({ params }: { params: { id: string } }) {
if (reader) {
while (true) {
const { done, value } = await reader.read()
if (done) break
if (done) {
break
}
let temp = new TextDecoder().decode(value);
let currentState = JSON.parse(temp)
if (currentState['error']) {
Expand Down Expand Up @@ -181,14 +183,11 @@ export default function Page({ params }: { params: { id: string } }) {
console.log(input)
if (input.startsWith("#goat")) {
runGoatPipeline()
} else if (env === "production") {
handleSubmitProduction(e);
} else {
// handleSubmitProduction(e);
if (env === "production") {
handleSubmitProduction(e);
} else {
// Call the handleSubmit function with the options
handleSubmit(e, requestOptions);
}
// Call the handleSubmit function with the options
handleSubmit(e, requestOptions);
}

};
Expand Down
19 changes: 10 additions & 9 deletions ui/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export default function Home() {
if (reader) {
while (true) {
const { done, value } = await reader.read()
if (done) break
if (done) {
break
}
let temp = new TextDecoder().decode(value);
let currentState = JSON.parse(temp)
if (currentState['error']) {
Expand Down Expand Up @@ -204,21 +206,20 @@ export default function Home() {
console.log(input)
if (input.startsWith("#goat")) {
runGoatPipeline()
} else if (env === "production") {
handleSubmitProduction(e);
} else {
// handleSubmitProduction(e);
if (env === "production") {
handleSubmitProduction(e);
} else {
// Call the handleSubmit function with the options
handleSubmit(e, requestOptions);
}
// Call the handleSubmit function with the options
handleSubmit(e, requestOptions);
}

};

const onOpenChange = (isOpen: boolean) => {
const username = localStorage.getItem("ollama_user")
if (username) return setOpen(isOpen)
if (username) {
return setOpen(isOpen)
}

localStorage.setItem("ollama_user", "Anonymous")
window.dispatchEvent(new Event("storage"))
Expand Down

0 comments on commit 7cef6b6

Please sign in to comment.