-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #735 from basedosdados/feat/ajust-user-config
Feat/ajust user config
- Loading branch information
Showing
9 changed files
with
465 additions
and
27 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 |
---|---|---|
|
@@ -206,15 +206,15 @@ function MenuDrawerUser({ isOpen, onClose}) { | |
fontWeight="400" | ||
lineHeight="27px" | ||
letterSpacing="0.3px" | ||
>{userData?.username ? userData?.username : "Dadinho"}</Text> | ||
>{userData?.username || ""}</Text> | ||
<Text | ||
color="#6F6F6F" | ||
fontFamily="Ubuntu" | ||
fontSize="14px" | ||
fontWeight="400" | ||
lineHeight="27px" | ||
letterSpacing="0.3px" | ||
>{userData?.email ? userData?.email : "[email protected]"}</Text> | ||
>{userData?.email || ""}</Text> | ||
</Stack> | ||
|
||
<Accordion allowToggle width="100%" defaultIndex={0}> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import axios from "axios"; | ||
import cookies from "js-cookie"; | ||
|
||
const API_URL= `${process.env.NEXT_PUBLIC_API_URL}/api/v1/graphql` | ||
|
||
export default async function deleteAccount(id) { | ||
let token = cookies.get("token") || "" | ||
|
||
try { | ||
const res = await axios({ | ||
url: API_URL, | ||
method: "POST", | ||
headers: { | ||
Authorization: `Bearer ${token}` | ||
}, | ||
data: { | ||
query: ` | ||
mutation { | ||
DeleteAccount (id: "${id}") { errors } | ||
}` | ||
} | ||
}) | ||
const data = res.data.data.DeleteAccount | ||
return data | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
} |
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
Oops, something went wrong.