-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge FeedbackBanner and UserBanner into Banner
- Loading branch information
1 parent
05a0596
commit bced69d
Showing
9 changed files
with
84 additions
and
89 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use client'; | ||
|
||
import { LogOut } from 'lucide-react'; | ||
import Link from 'next/link'; | ||
import { Button } from '~/components/ui/Button'; | ||
import { useSession } from '~/providers/SessionProvider'; | ||
import FeedbackBanner from './FeedbackBanner'; | ||
import { usePathname } from 'next/navigation'; | ||
|
||
const BannerContent = () => { | ||
const { session, signOut } = useSession(); | ||
const pathname = usePathname(); | ||
|
||
if (session && pathname.startsWith('/interview/')) { | ||
return ( | ||
<div className="flex w-full items-center justify-between px-4"> | ||
<p className="text-sm font-bold leading-6"> | ||
You are currently logged in. | ||
</p> | ||
<FeedbackBanner /> | ||
<div className="flex gap-x-4"> | ||
<Link href="/dashboard"> | ||
<Button variant="default" color="primary" size="sm"> | ||
Return to Dashboard{' '} | ||
<LogOut className="ml-2" size={16} strokeWidth={3} /> | ||
</Button> | ||
</Link> | ||
<Button variant="link" color="primary" size="sm" onClick={signOut}> | ||
Sign out | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
return <FeedbackBanner />; | ||
}; | ||
|
||
export default BannerContent; |
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,23 @@ | ||
import FeedbackButton from './FeedbackButton'; | ||
|
||
const FeedbackBanner = () => { | ||
return ( | ||
<div className="mx-auto flex items-center gap-x-3"> | ||
<p className="text-sm leading-6 text-gray-900"> | ||
<strong className="font-semibold">🤖 Fresco is Alpha software</strong> | ||
<svg | ||
viewBox="0 0 2 2" | ||
className="mx-2 inline h-0.5 w-0.5 fill-current" | ||
aria-hidden="true" | ||
> | ||
<circle cx={1} cy={1} r={1} /> | ||
</svg> | ||
We would appreciate input about how we can improve it, and reports or | ||
any issues you find. | ||
</p> | ||
<FeedbackButton /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FeedbackBanner; |
File renamed without changes.
File renamed without changes.
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