Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=e01b7895a403fa7364061b2f01a650fc
BACKEND_API_HOST=https://demo.duendesoftware.com
BACKEND_API_HOST=https://new-dev.accelist.com:1234
OIDC_ISSUER=https://demo.duendesoftware.com
OIDC_CLIENT_ID=interactive.public.short
OIDC_SCOPE=openid profile email api offline_access
80 changes: 9 additions & 71 deletions components/DefautLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import Head from 'next/head';
import { Avatar, Button, ConfigProvider, Drawer, Layout, Menu, MenuProps } from "antd";
import { faBars, faSignOut, faSignIn, faHome, faCubes, faUser, faUsers, faFlaskVial } from '@fortawesome/free-solid-svg-icons'
import { faBars, faSignOut, faSignIn, faHome, faUser, faPlus } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useRouter } from "next/router";
import { useSession, signIn, signOut } from "next-auth/react";
Expand Down Expand Up @@ -29,79 +29,17 @@ const DefaultLayout: React.FC<{

menu.push({
key: '/',
label: 'Home',
label: 'Main menu',
icon: <FontAwesomeIcon icon={faHome}></FontAwesomeIcon>,
onClick: () => router.push('/')
});

menu.push(
{
key: '#menu-1',
label: 'Menu 1',
icon: <FontAwesomeIcon icon={faCubes}></FontAwesomeIcon>,
children: [
{
key: '/dashboard',
label: 'Dashboard',
onClick: () => router.push('/dashboard')
},
{
key: '/sub-menu-b',
label: 'Sub Menu B',
onClick: () => router.push('/')
},
{
key: '/sub-menu-c',
label: 'Sub Menu C',
onClick: () => router.push('/')
}
]
},
{
key: '#menu-2',
label: 'Menu 2',
icon: <FontAwesomeIcon icon={faUsers}></FontAwesomeIcon>,
children: [
{
key: '/sub-menu-d',
label: 'Sub Menu D',
onClick: () => router.push('/')
},
{
key: '/sub-menu-e',
label: 'Sub Menu E',
onClick: () => router.push('/')
},
{
key: '/sub-menu-f',
label: 'Sub Menu F',
onClick: () => router.push('/')
}
]
},
{
key: '#menu-3',
label: 'Menu 3',
icon: <FontAwesomeIcon icon={faFlaskVial}></FontAwesomeIcon>,
children: [
{
key: '/sub-menu-g',
label: 'Sub Menu G',
onClick: () => router.push('/')
},
{
key: '/sub-menu-h',
label: 'Sub Menu H',
onClick: () => router.push('/')
},
{
key: '/sub-menu-i',
label: 'Sub Menu I',
onClick: () => router.push('/')
}
]
}
);
menu.push({
key: '/orders/create',
label: 'Create new order',
icon: <FontAwesomeIcon icon={faPlus} />,
onClick: () => router.push('/orders/create')
});

if (status === 'authenticated') {
menu.push({
Expand All @@ -119,7 +57,7 @@ const DefaultLayout: React.FC<{
});
} else {
menu.push({
key: '/sign-in',
key: '/login',
label: 'Sign in',
icon: <FontAwesomeIcon icon={faSignIn}></FontAwesomeIcon>,
onClick: () => {
Expand Down
5 changes: 5 additions & 0 deletions data/RegisteredEmails.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { atom } from "jotai";

const registeredEmailsAtom = atom<string[]>([]);

export default registeredEmailsAtom;
Loading