-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHORE] - Improve formatting on frontend
- Loading branch information
Showing
11 changed files
with
62 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/preset-env', | ||
['@babel/preset-react', { runtime: 'automatic' }], | ||
], | ||
}; | ||
presets: [ | ||
"@babel/preset-env", | ||
["@babel/preset-react", { runtime: "automatic" }], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
collectCoverage: true, | ||
coverageReporters: ['text', 'cobertura'], | ||
} | ||
collectCoverage: true, | ||
coverageReporters: ["text", "cobertura"], | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import axios from "axios"; | ||
|
||
function getCookie(name: string) { | ||
const value = `; ${document.cookie}`; | ||
const parts = value.split(`; ${name}=`); | ||
if (parts.length === 2) return parts.pop().split(";").shift(); | ||
const value = `; ${document.cookie}`; | ||
const parts = value.split(`; ${name}=`); | ||
if (parts.length === 2) return parts.pop().split(";").shift(); | ||
} | ||
|
||
export default function fetchOrCreateUser(data: any) { | ||
const csrftoken = getCookie("csrftoken"); | ||
return axios | ||
.post("api/authenticate/", data, { | ||
headers: { | ||
"X-CSRFToken": csrftoken, | ||
}, | ||
}) | ||
.then((res) => console.log(res.data)) | ||
.catch((err) => console.log(err)); | ||
const csrftoken = getCookie("csrftoken"); | ||
return axios | ||
.post("api/authenticate/", data, { | ||
headers: { | ||
"X-CSRFToken": csrftoken, | ||
}, | ||
}) | ||
.then((res) => console.log(res.data)) | ||
.catch((err) => console.log(err)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters