-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: new admin * feat: wip * feat: wip * feat: wip * feat: wip --------- Co-authored-by: Sebastien Vanvelthem <[email protected]>
- Loading branch information
1 parent
3fdf710
commit bf3dab0
Showing
32 changed files
with
737 additions
and
143 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,6 @@ module.exports = [ | |
{ | ||
name: 'CSS', | ||
path: ['.next/static/css/**/*.css'], | ||
limit: '10 kB', | ||
limit: '15 kB', | ||
}, | ||
]; |
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,33 @@ | ||
import type { FC } from 'react'; | ||
|
||
type FullName = { | ||
firstName: string; | ||
lastName?: string; | ||
}; | ||
|
||
type Props = { | ||
name: string | FullName; | ||
className?: string; | ||
}; | ||
|
||
const mapToFullName = (nameOrFullName: string | FullName): FullName => { | ||
if (typeof nameOrFullName === 'string') { | ||
const [firstName, lastName] = nameOrFullName.split(' '); | ||
return { | ||
firstName, | ||
lastName, | ||
}; | ||
} | ||
return nameOrFullName; | ||
}; | ||
|
||
export const TextAvatar: FC<Props> = (props) => { | ||
const { name, className = '' } = props; | ||
const { firstName, lastName } = mapToFullName(name); | ||
return ( | ||
<div className={`text-avatar ${className}`}> | ||
{firstName} | ||
{lastName} | ||
</div> | ||
); | ||
}; |
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 |
---|---|---|
|
@@ -24,7 +24,10 @@ export const nextAuthConfig: NextAuthOptions = { | |
async authorize(credentials, _req) { | ||
if (!credentials) throw new HttpUnauthorized('No credentials provided'); | ||
const { username, password } = credentials ?? {}; | ||
if (username === 'admin' && password === 'demo') { | ||
if ( | ||
['admin', '[email protected]'].includes(username) && | ||
password === 'demo' | ||
) { | ||
return { | ||
id: '1', | ||
name: 'admin', | ||
|
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.
bf3dab0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
monorepo-nextjs-app – ./apps/nextjs-app
monorepo-nextjs-app-belgattitude.vercel.app
monorepo-nextjs-app-git-main-belgattitude.vercel.app
monorepo-nextjs-app.vercel.app
bf3dab0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
monorepo-vite-app – ./apps/vite-app
monorepo-vite-app.vercel.app
monorepo-vite-app-belgattitude.vercel.app
monorepo-vite-app-git-main-belgattitude.vercel.app