Rebuild the About page from the current marketing frames, and leave the unapproved sentences off the page.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3dee3a587b
commit
2101676429
56 files changed
+1515
-238
No files matched your search
@@ -0,0 +1,67 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* Figma: "Section / Your Turn" (24239:1397)
|
||||
*/
|
||||
|
||||
import { memo, useCallback, useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useMessages } from "../../../contexts/MessagesContext";
|
||||
import { fetchAuthSession } from "../../../../lib/create/api";
|
||||
import { prepareFreshCreateFlowEntrySync } from "../../../(app)/create/utils/prepareFreshCreateFlowEntry";
|
||||
import AskOrganizerInquiryModal from "../../modals/AskOrganizerInquiry";
|
||||
import YourTurnView from "./YourTurn.view";
|
||||
|
||||
const YourTurnContainer = memo(() => {
|
||||
const router = useRouter();
|
||||
const copy = useMessages().pages.about.yourTurn;
|
||||
const [signedIn, setSignedIn] = useState(false);
|
||||
const [inquiryOpen, setInquiryOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
void fetchAuthSession()
|
||||
.then(({ user }) => {
|
||||
if (!cancelled) setSignedIn(Boolean(user));
|
||||
})
|
||||
.catch(() => {
|
||||
/* guest fallback */
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, []);
|
||||
|
||||
const onCreateRule = useCallback(() => {
|
||||
prepareFreshCreateFlowEntrySync({ signedIn });
|
||||
router.push("/create/informational");
|
||||
}, [router, signedIn]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<YourTurnView
|
||||
heading={copy.heading}
|
||||
body={copy.body}
|
||||
createRule={copy.createRule}
|
||||
facilitator={copy.facilitator}
|
||||
facilitatorHref={copy.facilitatorHref}
|
||||
questionsLead={copy.questionsLead}
|
||||
faq={copy.faq}
|
||||
faqHref={copy.faqHref}
|
||||
or={copy.or}
|
||||
askOrganizer={copy.askOrganizer}
|
||||
illustrationCaption={copy.illustrationCaption}
|
||||
onCreateRule={onCreateRule}
|
||||
onAskOrganizer={() => setInquiryOpen(true)}
|
||||
/>
|
||||
<AskOrganizerInquiryModal
|
||||
isOpen={inquiryOpen}
|
||||
onClose={() => setInquiryOpen(false)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
});
|
||||
|
||||
YourTurnContainer.displayName = "YourTurn";
|
||||
|
||||
export default YourTurnContainer;
|
||||
Reference in new issue
Block a user