From 924656ce13953bac54cb35af915cc570b96ad9a3 Mon Sep 17 00:00:00 2001 From: swve Date: Sat, 24 Sep 2022 20:06:05 +0200 Subject: [PATCH] feat: init collections index + delete --- front/components/security/AuthProvider.tsx | 2 +- front/components/ui/header.tsx | 13 +---- front/components/ui/layout.tsx | 14 ++++- front/pages/index.tsx | 2 + front/pages/login.tsx | 2 + front/pages/organizations/index.tsx | 67 ++++++++++++++++++++++ front/pages/organizations/new.tsx | 13 +++++ front/pages/organizations/update.tsx | 0 front/pages/signup.tsx | 2 + front/services/orgs.ts | 37 ++++++++++++ src/routers/auth.py | 1 + src/routers/orgs.py | 13 ++++- src/services/auth.py | 4 +- src/services/orgs.py | 19 ++++-- 14 files changed, 167 insertions(+), 22 deletions(-) create mode 100644 front/pages/organizations/index.tsx create mode 100644 front/pages/organizations/new.tsx create mode 100644 front/pages/organizations/update.tsx create mode 100644 front/services/orgs.ts diff --git a/front/components/security/AuthProvider.tsx b/front/components/security/AuthProvider.tsx index 90210b9d..acb32de8 100644 --- a/front/components/security/AuthProvider.tsx +++ b/front/components/security/AuthProvider.tsx @@ -28,7 +28,7 @@ const AuthProvider = (props: any) => { userInfo = await getUserInfo(access_token); isAuthenticated = true; setAuth({ access_token, isAuthenticated, userInfo, isLoading }); - } else if (!access_token) { + } else{ isAuthenticated = false; setAuth({ access_token, isAuthenticated, userInfo, isLoading }); } diff --git a/front/components/ui/header.tsx b/front/components/ui/header.tsx index a6010743..4bb85c8f 100644 --- a/front/components/ui/header.tsx +++ b/front/components/ui/header.tsx @@ -8,19 +8,8 @@ export const Header = () => { return (
- 🚧 Pre-Alpha
); }; -const PreAlphaLabel = styled.div` - position: fixed; - bottom: 0; - right: 0; - padding: 9px; - background-color: #080501; - color: white; - font-size: 19px; - font-weight: bold; - border-radius: 5px 0 0 0px; - `; + diff --git a/front/components/ui/layout.tsx b/front/components/ui/layout.tsx index 222b123c..1eb548c7 100644 --- a/front/components/ui/layout.tsx +++ b/front/components/ui/layout.tsx @@ -13,7 +13,7 @@ const Layout = (props: any) => { -
+ 🚧 Pre-Alpha
{props.children}