working on login

This commit is contained in:
nospeedlimitindonesia
2024-07-31 06:16:50 +00:00
parent ab3732fe9d
commit 43a2ec337c
5 changed files with 46 additions and 17 deletions

View File

@@ -121,9 +121,11 @@ function App() {
setDeviceType("guestDevice");
} else {
setUser(data.data.user);
if (data.data.user.cafeId === shopId) {
console.log(data.data.user);
if (data.data.user.cafeId == shopId) {
const connectedGuestSides = await getConnectedGuestSides();
setGuestSides(connectedGuestSides.sessionDatas);
console.log("getting guest side");
setDeviceType("clerk");
} else {
setDeviceType("guestDevice");
@@ -258,7 +260,7 @@ function App() {
}
/>
<Route
path="/:shopId/:tableId?invoice"
path="/:shopId/:tableId?/invoice"
element={
<>
<Invoice sendParam={handleSetParam} deviceType={deviceType} />