Skip to content

Commit

Permalink
Fix user sign out
Browse files Browse the repository at this point in the history
  • Loading branch information
zackatbrightbeam committed Jan 29, 2024
1 parent 00aba90 commit f281262
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 36 deletions.
12 changes: 1 addition & 11 deletions dist/voxgig-model-react.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -20381,17 +20381,7 @@ function BasicHead(props) {
const handleLogout = () => __async(this, null, function* () {
const signout = yield seneca.post("aim:web,on:auth,signout:user");
console.log("signout", signout);
const res = yield seneca.post("aim:app,set:state", {
section: "auth.state",
content: "none"
});
console.log("res", res);
if (res && signout.ok) {
console.log("signed out");
document.location.href = document.location.origin + "/";
} else {
console.log("failed to sign out");
}
document.location.href = document.location.origin + "/";
});
if (basicHeadSpec.head.variant === "permanent") {
return /* @__PURE__ */ jsxRuntimeExports.jsx(
Expand Down
12 changes: 1 addition & 11 deletions dist/voxgig-model-react.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -20393,17 +20393,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
const handleLogout = () => __async(this, null, function* () {
const signout = yield seneca.post("aim:web,on:auth,signout:user");
console.log("signout", signout);
const res = yield seneca.post("aim:app,set:state", {
section: "auth.state",
content: "none"
});
console.log("res", res);
if (res && signout.ok) {
console.log("signed out");
document.location.href = document.location.origin + "/";
} else {
console.log("failed to sign out");
}
document.location.href = document.location.origin + "/";
});
if (basicHeadSpec.head.variant === "permanent") {
return /* @__PURE__ */ jsxRuntimeExports.jsx(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@voxgig/model-react",
"version": "1.8.0",
"version": "1.9.0",
"license": "MIT",
"files": [
"dist"
Expand Down
14 changes: 1 addition & 13 deletions src/lib/BasicHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,7 @@ function BasicHead (props: BasicHeadProps) {

console.log('signout', signout)

const res = await seneca.post('aim:app,set:state', {
section: 'auth.state',
content: 'none'
})

console.log('res', res)

if (res && signout.ok) {
console.log('signed out')
document.location.href = document.location.origin + '/'
} else {
console.log('failed to sign out')
}
document.location.href = document.location.origin + '/'
}

if (basicHeadSpec.head.variant === 'permanent') {
Expand Down

0 comments on commit f281262

Please sign in to comment.