Skip to content

Commit 45f6d3c

Browse files
committed
fix build
1 parent f55123d commit 45f6d3c

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

apps/docs/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function App() {
1818
return (
1919
<FacebookProvider appId="YOUR_APP_ID">
2020
<Login
21-
scope="email,public_profile"
21+
scope={['email', 'public_profile']}
2222
onSuccess={(response) => console.log('Login Success!', response)}
2323
onError={(error) => console.log('Login Failed!', error)}
2424
>
@@ -150,7 +150,7 @@ export default function HomePage() {
150150
</h3>
151151
<div className="mb-4">
152152
<Login
153-
scope="email,public_profile"
153+
scope={['email', 'public_profile']}
154154
onSuccess={(response) => {
155155
console.log('Login Success!', response)
156156
alert('Login successful! Check console for details.')
@@ -170,7 +170,7 @@ export default function HomePage() {
170170
<div className="flex-1">
171171
<CodeBlock
172172
code={`<Login
173-
scope="email,public_profile"
173+
scope={['email', 'public_profile']}
174174
onSuccess={(response) => console.log('Success!', response)}
175175
onError={(error) => console.log('Error!', error)}
176176
>

apps/docs/app/playground/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ function PlaygroundPageContent({ appId, setAppId, locale, setLocale }: { appId:
399399
>
400400
<ShareButton
401401
href={shareButtonHref}
402+
display="popup"
402403
hashtag={shareButtonHashtag || undefined}
403404
className="bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition-colors inline-flex items-center space-x-2"
404405
>
@@ -419,7 +420,7 @@ function PlaygroundPageContent({ appId, setAppId, locale, setLocale }: { appId:
419420
<PropControl label="Render Type" description="How to render the login component">
420421
<Select
421422
value={loginRenderType}
422-
onChange={setLoginRenderType}
423+
onChange={(value) => setLoginRenderType(value as 'function' | 'default' | 'custom')}
423424
options={[
424425
{ value: 'default', label: 'Default Button' },
425426
{ value: 'custom', label: 'Custom Styled' },
@@ -789,8 +790,8 @@ function PlaygroundPageContent({ appId, setAppId, locale, setLocale }: { appId:
789790

790791
<PropControl label="Width" description="Plugin width in pixels">
791792
<NumberInput
792-
value={postWidth}
793-
onChange={setPostWidth}
793+
value={parseInt(postWidth)}
794+
onChange={(value) => setPostWidth(value.toString())}
794795
min={350}
795796
max={750}
796797
/>

apps/docs/app/testimonials/page.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ import Navigation from '@/components/Navigation'
66
export default function TestimonialsPage() {
77

88
// Sample testimonials (empty for now, can be populated later)
9-
const testimonials = [
9+
const testimonials: Array<{
10+
company: string;
11+
logo?: string;
12+
quote: string;
13+
author: string;
14+
title: string;
15+
useCase: string;
16+
scale: string;
17+
}> = [
1018
// Example structure:
1119
// {
1220
// company: "Example Corp",

apps/docs/components/LiveExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Eye, Code, RefreshCw } from 'lucide-react'
77

88
interface LiveExampleProps {
99
title: string
10-
description: string
10+
description: string | ReactNode
1111
code: string
1212
controls?: ReactNode
1313
children: ReactNode

packages/react-facebook/src/components/Login.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ type LoginRenderProps = {
1010
isDisabled: boolean;
1111
};
1212

13-
export type LoginProps = LoginOptions & {
13+
export type LoginProps = Omit<LoginOptions, 'scope'> & {
1414
children?: ReactNode | ((props: LoginRenderProps) => ReactElement);
1515

1616
onSuccess?: (response: LoginResponse) => void;
1717
onError?: (error: Error) => void;
1818
onProfileSuccess?: (profile: any) => void;
1919

20-
scope?: string[];
20+
scope?: string | string[];
2121
fields?: string[];
2222

2323

@@ -59,7 +59,7 @@ export default function Login(props: LoginProps) {
5959

6060
try {
6161
const response = await login({
62-
scope: scope.join(','),
62+
scope: Array.isArray(scope) ? scope.join(',') : scope,
6363
returnScopes,
6464
authType,
6565
rerequest,

0 commit comments

Comments
 (0)