-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E 1678 feature support v1 contactform (#3)
Co-authored-by: Alexis Benoliel <[email protected]>
- Loading branch information
1 parent
0769cc9
commit a769681
Showing
9 changed files
with
116 additions
and
38 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { useState } from "react"; | ||
|
||
export function useFeedbackDrawerState() { | ||
return useState<boolean>(false); | ||
} |
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,36 @@ | ||
import { FilloutStandardEmbed } from "@fillout/react"; | ||
|
||
import { Drawer } from "@/design-system/molecules/drawer"; | ||
|
||
import { useFeedbackDrawerState } from "@/shared/features/feedback-drawer/feedback-drawer.hooks"; | ||
import { useAuthUser } from "@/shared/hooks/auth/use-auth-user"; | ||
|
||
export function FeedbackDrawer({ state }: { state: ReturnType<typeof useFeedbackDrawerState> }) { | ||
const [isOpen, setIsOpen] = state; | ||
|
||
const { user } = useAuthUser(); | ||
|
||
return ( | ||
<Drawer | ||
isOpen={isOpen} | ||
onOpenChange={setIsOpen} | ||
hideHeader | ||
classNames={{ | ||
body: "p-0 h-full", | ||
}} | ||
> | ||
<FilloutStandardEmbed | ||
filloutId="uUS6ESXXcjus" | ||
inheritParameters | ||
parameters={{ | ||
user_id: user?.id, | ||
first_name: user?.firstName || undefined, | ||
last_name: user?.lastName || undefined, | ||
email: user?.email || undefined, | ||
github_id: `${user?.githubUserId}` || undefined, | ||
github_login: user?.login || undefined, | ||
}} | ||
/> | ||
</Drawer> | ||
); | ||
} |
4 changes: 2 additions & 2 deletions
4
shared/features/navigation/menu/primary-menu/primary-menu.tsx
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
17 changes: 12 additions & 5 deletions
17
shared/features/navigation/menu/secondary-menu/secondary-menu.tsx
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 |
---|---|---|
@@ -1,23 +1,30 @@ | ||
import { SecondaryMenuProps } from "shared/features/navigation/menu/secondary-menu/secondary-menu.types"; | ||
|
||
import { ItemNav } from "@/design-system/molecules/item-nav"; | ||
|
||
import { FeedbackDrawer } from "@/shared/features/feedback-drawer/feedback-drawer"; | ||
import { useFeedbackDrawerState } from "@/shared/features/feedback-drawer/feedback-drawer.hooks"; | ||
|
||
import { SecondaryMenuProps } from "./secondary-menu.types"; | ||
|
||
export function SecondaryMenu({ isFolded }: SecondaryMenuProps) { | ||
const feedbackDrawerState = useFeedbackDrawerState(); | ||
const [, setIsOpen] = feedbackDrawerState; | ||
return ( | ||
<> | ||
<ItemNav | ||
isFolded={isFolded} | ||
icon={{ name: "ri-settings-line" }} | ||
icon={{ name: "ri-chat-4-line" }} | ||
href={"/test"} | ||
translate={{ token: "primaryNavigation:secondaryMenu.support" }} | ||
onClick={() => setIsOpen(true)} | ||
/> | ||
<ItemNav | ||
isFolded={isFolded} | ||
icon={{ name: "ri-chat-4-line" }} | ||
href={"/test2"} | ||
icon={{ name: "ri-settings-line" }} | ||
href={"/test"} | ||
translate={{ token: "primaryNavigation:secondaryMenu.settings" }} | ||
isDisabled={true} | ||
/> | ||
<FeedbackDrawer state={feedbackDrawerState} /> | ||
</> | ||
); | ||
} |
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