MCPcopy Create free account
hub / github.com/dailydotdev/apps / PostAuthBanner

Function PostAuthBanner

packages/shared/src/components/auth/PostAuthBanner.tsx:30–52  ·  view source on GitHub ↗
({
  targetId,
}: PostAuthBannerProps = {})

Source from the content-addressed store, hash-verified

28}
29
30export const PostAuthBanner = ({
31 targetId,
32}: PostAuthBannerProps = {}): ReactElement => {
33 const searchParams = useSearchParams();
34 const { geo } = useAuthContext();
35
36 const userId = searchParams?.get('userid');
37
38 if (userId) {
39 return <UserPersonalizedBanner userId={userId} targetId={targetId} />;
40 }
41
42 const social = getSocialReferrer();
43 if (social) {
44 return <SocialPersonalizedBanner site={social} targetId={targetId} />;
45 }
46
47 if (geo?.region) {
48 return <GeoPersonalizedBanner geo={geo.region} targetId={targetId} />;
49 }
50
51 return <AuthenticationBanner targetId={targetId} />;
52};

Callers

nothing calls this directly

Calls 3

useAuthContextFunction · 0.90
getSocialReferrerFunction · 0.90
useSearchParamsFunction · 0.85

Tested by

no test coverage detected