Skip to content

Commit

Permalink
chore: fix broken build by downgrading to a lower version
Browse files Browse the repository at this point in the history
  • Loading branch information
kasir-barati committed May 17, 2024
1 parent 3196b41 commit ddfbe14
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 22 deletions.
1 change: 0 additions & 1 deletion apps/frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
2 changes: 1 addition & 1 deletion apps/frontend/src/app/profile/[username]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const gap = 2;
export default function EditProfile({
params,
}: Readonly<EditProfileProps>) {
const { userInfo } = useFusionAuth();
const { user: userInfo } = useFusionAuth();
const username = params.username;
const handleRemoveInterest = (value: string) => {
console.log(value);
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/app/profile/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { DefaultCoverImage } from '../../../shared/components/default-cover-imag

// TODO: utilize useFusionAuth + http calls to fetch necessary data for profile page
export default function Profile({ params }: Readonly<ProfileProps>) {
const { userInfo } = useFusionAuth();
const { user: userInfo } = useFusionAuth();
const username = params.username;
const bio = 'water earth fire air '.repeat(50).trim();

Expand Down
13 changes: 6 additions & 7 deletions apps/frontend/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FusionAuthProviderConfig } from '@fusionauth/react-sdk';
import { FusionAuthConfig as FusionAuthProviderConfig } from '@fusionauth/react-sdk';

export const fusionAuthProviderConfig: FusionAuthProviderConfig = {
mePath: '/auth/me',
Expand All @@ -9,10 +9,9 @@ export const fusionAuthProviderConfig: FusionAuthProviderConfig = {
redirectUri: process.env.NEXT_PUBLIC_FRONTEND_URL,
serverUrl: process.env.NEXT_PUBLIC_BACKEND_BASE_URL,
scope: process.env.NEXT_PUBLIC_FUSIONAUTH_OAUTH_SCOPES,
clientId: process.env.NEXT_PUBLIC_FUSIONAUTH_APPLICATION_ID,
shouldAutoFetchUserInfo: true,
shouldAutoRefresh: true,
onRedirect(_state) {
// TODO: Add notification
},
clientID: process.env.NEXT_PUBLIC_FUSIONAUTH_APPLICATION_ID,
// TODO: https://github.com/FusionAuth/fusionauth-javascript-sdk/issues/99
// shouldAutoFetchUserInfo: true,
// shouldAutoRefresh: true,
// onRedirect(_state) {},
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { SignUpButton } from '../sign-up-button/sign-up-modal.component';
import { SubscriptionTextField } from '../subscription-text-field/subscription-text-field.component';

export function Footer() {
const { isLoggedIn } = useFusionAuth();
const { isAuthenticated: isLoggedIn } = useFusionAuth();

return (
<Stack paddingY={3} rowGap={2}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const countDownGrid2Sx = {
};

export function AccountButton() {
const { userInfo } = useFusionAuth();
const { user: userInfo } = useFusionAuth();
const { isOpen, openModal, closeModal } = useModal();
const avatarAlt = userInfo?.given_name ?? 'Avatar';
const avatarUrl = userInfo?.picture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { AccountButton } from './account-button.component';
export function DesktopToolbar({
id,
}: Readonly<DesktopToolbarProps>) {
const { isLoggedIn } = useFusionAuth();
const { isAuthenticated: isLoggedIn } = useFusionAuth();

return (
<Toolbar disableGutters id={id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const navItems = [
export function MobileToolbar({ id }: Readonly<MobileToolbarProps>) {
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const pathname = usePathname();
const { startLogin, isLoggedIn } = useFusionAuth();
const { login: startLogin, isAuthenticated: isLoggedIn } =
useFusionAuth();
const handleLogin = () => {
startLogin(pathname ?? undefined);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { usePathname } from 'next/navigation';

export function SignInModal() {
const pathname = usePathname();
const { startLogin } = useFusionAuth();
const { login: startLogin } = useFusionAuth();
const handleClick = () => {
startLogin(pathname ?? undefined);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useFusionAuth } from '@fusionauth/react-sdk';
import Button from '@mui/material/Button';

export function SingOutButton() {
const { startLogout } = useFusionAuth();
const { logout: startLogout } = useFusionAuth();

return <Button onClick={startLogout}>Sign out</Button>;
}
19 changes: 14 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fusionauth/react-sdk": "^2.1.1",
"@fusionauth/react-sdk": "^1.0.6",
"@fusionauth/typescript-client": "^1.49.1",
"@mdxeditor/editor": "^3.0.5",
"@mui/icons-material": "^5.15.17",
Expand Down

0 comments on commit ddfbe14

Please sign in to comment.